
17 Mar
2011
17 Mar
'11
2:15 a.m.
Dan Walters wrote:
I do not understand your comment about f() indirectly causing the object to be destroyed, could you explain this a little more? if f() is a member function, surely that would involve the line "delete this;" ? I am missing something...
It's rarely as direct as "delete this"; the chain is usually more convoluted, f.ex. p->f() calls g() which calls h() which happens to replace the contents of a container that owns the object.