[fpc-pascal]Constructor failing...

Peter Vreman peter at freepascal.org
Fri Mar 21 12:29:09 CET 2003

>> > But, when I use fail in my simple example program, it returns
>> NIL okay but
>> > the Heaptrace function tells me I have two unfreed memory blocks (36
>> > bytes).
>> > I can't see a memory leak anywhere else in that program, what
>> could cause
>> > this? (Heaptrace output is as follows: I am using FPC 1.0.6 btw)
>> >
>> [snip heap dump]
>> That is the exception frame that is left on the heap. I don't have the
>> time to analyze what the cause is that the exception frame is not
>> removed.
> It may be a bug in 1.0.6 which has subsequently been fixed. I downloaded
> and
> installed the 1.1 snapshots and compiled the same source code, and the
> memory leak vanishes....

The reason why 1.1 has no leak is that it uses the stack to store the
exception frames. The real problem is still there, because exception stack
is still not updated

More information about the fpc-pascal mailing list