cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
forcefully destructor in class
forcefully destructor in class
Jun 2, 2010 at 6:05pm UTC
agoswami
(135)
Hi,
do we have any scenario in the class where we have to declair destructor explicity?. if we do not declair than it will gives us compiler error.
Jun 2, 2010 at 7:55pm UTC
hamsterman
(4538)
Not defining a destructor will not give you an error. That doesn't mean you can always do that.
If a structure has some pointers that point to dynamically allocated memory you may want to delete that memory in your destructor..
Topic archived. No new replies allowed.