Re: [fpc-pascal] Automatic objects

2006-08-04 Thread Lars Eriksen
Marco van de Voort wrote: 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. In general it is considered a good custom to destroy them. So no C++-style automatic deallocation (the destructor is

[fpc-pascal] Automatic objects

2006-08-04 Thread Lars Eriksen
Hello! I've recently switched from Delphi to FP and never been exposed to TP-style objects before. At first sight they seem very similar to Delphi-style classes. However, it seems it is possible to allocate them on the stack - very convenient. Is it right to assume they are automatically de