[Lazarus] Is this a bug?

Wolf wv99999 at gmail.com
Fri Jun 16 10:36:54 CEST 2017


Now I am nicely confused: If halt does call finalization sections, isn't 
then all heap space requested by the system unit supposed to be freed as 
well? I do have observed at times that some, and sometimes even all heap 
space requested by the system unit, does get freed when calling halt. 
So, what does this program show? Expected behavior that should not be 
changed, or is it unexpected behavior that ought to be reported and changed?
wolf

On 16/06/17 19:33, Mattias Gaertner via Lazarus wrote:
> On Fri, 16 Jun 2017 09:25:24 +0200
> Ondrej Pokorny via Lazarus <lazarus at lists.lazarus-ide.org> wrote:
>
>> On 16.06.2017 9:12, Wolf via Lazarus wrote:
>>> If the call to "halt;" is commented out, there is no memory leak
>>> reported. Is this intentional?
>> Yes, halt kills the program without finalizing anything. No code is
>> executed afterwards. Everything that is allocated at the time Halt is
>> executed results in a memory leak.
> Halt calls the finalization sections.
>
> Mattias



More information about the Lazarus mailing list