Possible Duplicate:
C++: Delete this?
What does it mean to delete this
pointer from a member function?
According to my understanding:
new
returns this
pointer, which we pass to delete
, which in turn calls the destructor before freeing memory. So delete this
should do the same thing.
My doubt is whether the destructor will be called or not?