"Aj" <[EMAIL PROTECTED]> writes:

> What would be helpful is if someone with knowledge of g++ internals
> could point to the code that answers the question one way or the other.

I don't know 'gcc' internals that well, but you do realize that
'delete[]' calls dtors for all objects, where 'delete' only calls dtor
for the first object.

So, if you 'delete pChar;' where 'delete [] pChar;' was intended,
you are pretty safe (where 'pChar' is of type 'char *', or any
other type with no, or trivial destructor). 

But 'delete pStdString' instead of 'delete [] pStdString;' (where
pStdString is of type 'std::string *'), and you'll leak memory like
a sieve.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to