Thread: c++ query
View Single Post
Old 25-07-2007, 09:46 PM   #2 (permalink)
Sykora
I see right through you.
 
Sykora's Avatar
 
Join Date: Sep 2005
Location: Chennai
Posts: 597
Default Re: c++ query

@First question :
As far as I can see, you've overridden the default destructor, so it doesn't really delete, only display your message. I really don't know how better to explain, other than to say that when you explicitly call the destructor, the object doesn't get deleted. I tried your code with some extras to test, and I found that I could access a member variable even after calling the destructor.

That said, no, you usually don't call the destructor explicitly.
__________________
I didn't make the world, I only try to live in it.
http://lucentbeing.com
-- Sykora --
Sykora is offline