Guillaume Laurent wrote:

> Kent Dahl wrote:
> 
> 
>>I'm no Qt wiz, so I've stepped on a few "gotchas" where Qt and the
>>widget-parent-ownership stuff deleted things. Which is how I read the
>>articles critique. "You new it, you delete it. Start what you finish.
>>Symmetry."
>>
> 
> Any mildly complex C++ program will bend of break this rule in one way or 
> another. The "new it, delete it" rule isn't something you should enforce 
> for the sake of it, it's an indication to help you making less mistakes. 
> 
> But if the language can get you rid of the burden of a stupid task (which 
> it should in the first place), what's the problem ?
> 
> Ob-Ruby : would you prefer it if Ruby wasn't a GCed language ? Of course 
> not. So there you have C++ turned into an "almost GCed" language... May be 
> te "almost" can puzzle you, but frankly I'll take every bit of help I can 
> get.


Using std::auto_ptr<> or other smart pointers (Boost) in C++ gets rid of 
the necessity of having to manually delete anything in that language.

While GC is nice, every language which has it needs a mechanism which 
forces the immediate destruction of a particular type of object when 
that object goes out of scope. Why ? Because without this feature, it is 
impossible to design objects which have resources which must be 
immediately released when the object is destroyed ( RAAI ). I can never 
understand why designers of languages which use GC ( Java is in that 
same boat ) never can understand this simple concept, and cripple their 
language accordingly.