Deallocate vtable when going out of scope