----------------------------------------
> Date: Mon, 31 Mar 2008 19:51:50 -0700
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: C++0X gets lambdas/closures
> 
> 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?
> 


Dynamic memory-  anything allocated with new.  

And no, it can't, not in the general case.  If you have a public member 
variable that's a pointer, it doesn't know if a calling app put a heap pointer 
in there.  All it can know is if its possible-  which is anytime it has any 
pointer member values.

Gabe
_________________________________________________________________
How well do you know your celebrity gossip?
http://originals.msn.com/thebigdebate?ocid=T002MSN03N0707A
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to