|
-
March 8th, 2013, 09:52 AM
#9
Re: virtual destructor
 Originally Posted by laserlight
The subclause following the "AND" should be discarded.
Hmm not quite...
If the derived class does not have additional datamembers, and doesn't do anything to existing datamembers (or globals) that need to be reversed, then the derived class doesn't need a destructor at all.
I'm not sure if this is 100% "by the book", but the above rule works for every single c++ compiler (even some very oddball ones) on every single platform tested so far.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|