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.
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
