[fpc-devel] MemoryLeak with AS Operator
helmut.hartl at firmos.at
Fri Jul 21 09:46:10 CEST 2006
In testing upcoming 2.0.4 release i found an incompatibility/memory
leak which is present in fpc versions greater 2.0.2.
I tested faulty against
2.0.3 fixes svn
2.1.1 head svn
2.0.4 rc2 branch svn
Working OK with 2.0.2 Release.
The following code runs differently on compiler versions greater 2.0.2
Item:IInterface): Integer; begin
FList^ := Item as IInterface; // (1)
//FList^ := Item; // (2)
(1) => Original Code No Memory Leak with FPC=2.0.2 but with > 2.0.2
(2) => No Memory Leak
Reported with a demo program as Bug 7174.
I post this to the list, as i spent the whole night on searching this
and maybe it helps someone out.
More information about the fpc-devel