When we write virtual function it adds a vtable in object of this class. Could it be true for virtual destructor too ? Is vtable accustomed to implement virtualness of destructor
I do not think that the C++ standard requires any particular mechanism for creating the right behavior, but yes, this is a typical implementation. A category with a minimum of 1 virtual function includes a table of (virtual) function pointers, the destructor being one of these, whether it's marked virtual.
Yes. Some good info is required to permit the right destructor to become known as once the object is erased using a base class pointer. Whether that details are a little integer index or perhaps a pointer does not matter (although dynamic linkage most likely suggests it's a pointer). Naturally, that information must be next to (inside) the pointed-to object.
Adding an online method of any sort, together with a destructor, to some class which had none before, increases sizeof(class).
Yes it's. Sorry I do not possess a definitive mention of the support my assertion. But exactly how else can you get different behavior when utilizing only a pointer towards the object?
Yes. Virtual destructor is much like every other virtual method. Vtable entry can get added.
It's treated like every other normal function and will also be put into the vtable.