Marco van de Voort wrote:
>> Is it right to assume they are automatically deallocated when they go 
>> out of scope (e.g. no need to free them manually)?
> 
> The space of the object is cleaned. However if the object uses dyn memory,
> you will have to call the destructor (destroy) to make the object cleanup.

I think in theory it's possible for the compiler to automatically call
the destructor always when leaving the function (think implicit
exception handlers here), but I guess not so many people are using them
anymore in new code that it would be worth it. Would need a new keyword
or something too, as it's not backward-compatible obviously.

Micha
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to