Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-07

AW: MemoryLeak with AS Operator

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Helmut Hartl

Hello,

can anyone give me a hint where to search for the "AS" compiler problem. We tried to workaround that in ZEOS Code and gave up, as we are not able to find all Memory holes and pinpoint them.

With 2.02 we have the problem that the TDataset has different behaviour than in Delphi (Datetime).

No we are making production code with a self patched 2.02 release (TDataset from 2.04) but that's no good solution.

Thanks,
helmut

Show quoted text 19 lines
Hello, In testing upcoming 2.0.4 release i found an incompatibility/memory leak which is present in fpc versions greater 2.0.2. ... The following code runs differently on compiler versions greater 2.0.2 function TTestCollection.Add(const Item:IInterface): Integer; begin FList^[0] := Item as IInterface; // (1) //FList^[0] := Item; // (2) end; (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.

http://www.freepascal.org/mantis/bug_view_advanced_page.php?bug_id=7174

Reply by email

Joost van der Sluis
to Helmut Hartl
With 2.02 we have the problem that the TDataset has different behaviour than in Delphi (Datetime).

That's easily patchable. And idscussed in this list a few times. Just return a TDateTime in the GetFieldData.

No we are making production code with a self patched 2.02 release (TDataset from 2.04) but that's no good solution.

Why not? It's the only one. There are several other changes in 2.0.4 that you need to get ZEOS working properly.

And as long ZEOS isn't released, you can safely build it against a fpc- version that isn't released. I guess that fpc 2.0.4 will be there long before the next ZEOS release.

Joost

Reply by email