Darren New wrote:
Gabriel Sechan wrote:
There are situations where you can have virtual functions yet not need a virtual destructor- whenever you have no dynamic memory in the class.

I'm not sure what you mean by "dynamic" memory.

Surely the C++ compiler can tell whether you have dynamic memory in the class? Isn't it staring you in the face?
What he means (well, not sure if this is what he means, but it *should* be what it means), is if you have any memory in the derived class that is allocated with new()/malloc(), or really any resources that need to be cleaned up in the subclass's destructor.

--Chris

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to