Thread: c++ query
View Single Post
Old 27-07-2007, 07:38 PM   #10 (permalink)
Zeeshan Quireshi
C# Be Sharp !
 
Zeeshan Quireshi's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
Default Re: c++ query

Quote:
Originally Posted by abhi_10_20
but, by definition, a destructor's purpose is to delete an object.....

as far as i remember, wen an object of a type of particular class is created,
and if u havent invoked a destructor, the compiler will implicitly call the destructor to free up space occupied by the object....

surely no for 2nd one bcoz a base class pointer mainly lets us to access addresses of derived class objects only....
by definition , a destructor is a method which is called when an object is deleted .
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
Zeeshan Quireshi is offline