Sign in Join

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

Mailing lists / lazarus / 2003-12

Memory leak in TDirectoryDefines?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner
to Vincent Snijders: I found another memory leak. The class TDirectoryDefines has a field UnitLinksTree which…
Show quoted text 10 lines
Hi, I found another memory leak. The class TDirectoryDefines has a field UnitLinksTree which contains node with TUnitNameLinks. These nodes don't seem to get freeed. Now, when the UnitLinksTree is freeed, the tree and the nodes are freeed, but as far as I can see not the TUnitNameLinks object which are contained in the data field of the nodes. Should I add some code to TDirectoryDefines.Destroy, to walk the tree and free the data?

Thanks. These three lines I can add without patch. ;)

Or should I look at something else. The memory leak occurs when you rebuild lazarus, including packages.

Fixed.

Mattias

Reply by email

Vincent Snijders

Hi,

I found another memory leak. The class TDirectoryDefines has a field UnitLinksTree which contains node with TUnitNameLinks. These nodes don't seem to get freeed.

Now, when the UnitLinksTree is freeed, the tree and the nodes are freeed, but as far as I can see not the TUnitNameLinks object which are contained in the data field of the nodes. Should I add some code to TDirectoryDefines.Destroy, to walk the tree and free the data? Or should I look at something else.

The memory leak occurs when you rebuild lazarus, including packages.

Regards,
Vincent.

Reply by email