[Lazarus] OpenDialog memory leak in GTK2 ?
Mattias Gaertner
nc-gaertnma at netcologne.de
Wed Mar 5 19:10:33 CET 2008
On Tue, 04 Mar 2008 22:45:38 +0000
Malcolm Poole <malcolm at lingua-z.co.uk> wrote:
> Hi,
>
> There seems to be a memory leak in the implementation of dialogs in
> GTK2.
>
> I compiled a form containing only a button and a TOpenDialog using
> yesterday's Lazarus snapshot and the heaptrc unit.
>
> If the dialog is opened and closed by using either of the buttons,
> when the application is terminated I get the output given below.
>
> It seems that the TFPList variable named FilterList which is created
> in line 113 of gtkfiledialogutils.inc is not being freed but I cannot
> work out where it should be freed.
Please create a bug report for this.
Mattias
>
> Hope someone can help.
>
> Regards, Malcolm
>
> /tmp/project1
> Heap dump by heaptrc unit
> 1930 memory blocks allocated : 102861/108992
> 1929 memory blocks freed : 102845/108976
> 1 unfreed memory blocks : 16
> True heap size : 884736
> True free heap : 884656
> Should be : 884664
> Call trace for block $B7FBB2A8 size 16
> $08067052
> $081DFED1 EXTRACTFILTERLIST, line 113 of
> /home/malcolm/Desktop/lazarus/lcl/interfaces/gtk/gtkfiledialogutils.inc
> $08249661 TGTK2WSOPENDIALOG__CREATEOPENDIALOGFILTER, line 233 of
> gtk2wsdialogs.pp
> $082499D5 TGTK2WSOPENDIALOG__CREATEHANDLE, line 336 of
> gtk2wsdialogs.pp $081A1E86 TCOMMONDIALOG__EXECUTE, line 36
> of ./include/commondialog.inc $081A2406 TFILEDIALOG__EXECUTE, line
> 62 of ./include/filedialog.inc $08084EA2 TFORM1__BUTTON1CLICK, line
> 34 of unit1.pas $0813D8C9 TCONTROL__CLICK, line 2022
> of ./include/control.inc
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
More information about the Lazarus
mailing list