Functions named 'scalar deleting destructor' and 'vector deleting destructor' are helper functions created by the VC compiler when generating code for the delete operator. Do not confuse them with a class destructor, which can also be generated by the compiler. The first can be expressed in pseudo-code as
void scalar_deleting_destructor(A* pa) { pa->~A(); A::operator delete(pa); }
and the last as
void vector_deleting_destructor(A* pa, size_t count) { for (size_t i = 0; i < count; ++i) pa[i].~A(); A::operator delete[](pa); }
Andrey
source share