On Friday 22 June 2007 13:59, Vincent Snijders wrote:
> On Fri, 22 Jun 2007 13:22:17 +0200
>
> zeljko <[EMAIL PROTECTED]> wrote:
> > Compiled simple project with -gh , and it seem that TForm doesn't call
> > Free() for it's children (created at design time) eg.
> >
> > MainForm -> Form1 ->
> >                       -> TRadioGroup with 4 radio buttons
> >                       -> TButton -> calls Close() of Form1.
> >
> > Tested under linux with:
> > gtk, gtk2, qt - fpc- 2.0.4
> >
> > If I explicitely call Free() for each of children in Form1.OnClose() then
> > it calls children's destructors, but still remains unfreed blocks for
> > form itself ?!?
>
> I found no memleaks using fpc 2.0.4 and 2.3.1 on i386-linux-gtk.

hm ... this is qt  heap dump

Heap dump by heaptrc unit
7638 memory blocks allocated : 396506/410992
7261 memory blocks freed     : 364235/377728
377 unfreed memory blocks : 32271
True heap size : 950272 (32 used in System startup)
True free heap : 889248
Should be : 895864
Call trace for block $406615A0 size 192
  $0805B0C0
  $080F7519  TBRUSH__CREATE,  line 89 of ./include/brush.inc
  $0811BC1C  TWINCONTROL__CREATEBRUSH,  line 3143 of ./include/wincontrol.inc
  $0811E160  TWINCONTROL__GETBRUSH,  line 4447 of ./include/wincontrol.inc
  $0811BCA3  TWINCONTROL__ERASEBACKGROUND,  line 3157 
of ./include/wincontrol.inc
  $0811EF37  TWINCONTROL__WMERASEBKGND,  line 5045 of ./include/wincontrol.inc
  $0805B5DC
  $08124F2A  TCONTROL__WNDPROC,  line 1545 of ./include/control.inc
Call trace for block $40661490 size 192

..... etc

this is gtk2 heap dump :
Heap dump by heaptrc unit
4068 memory blocks allocated : 183896/196320
3793 memory blocks freed     : 158619/170336
275 unfreed memory blocks : 25277
True heap size : 983040 (32 used in System startup)
True free heap : 936832
Should be : 941624
Call trace for block $4008E9B0 size 68
  $081DA694  CREATEWIDGETINFO,  line 4008 
of /usr/src/packages/BUILD/lazarus-0.9.23/lazarus/lcl/interfaces/gtk/gtkproc.inc
  $081DA799  GETWIDGETINFO,  line 4043 
of /usr/src/packages/BUILD/lazarus-0.9.23/lazarus/lcl/interfaces/gtk/gtkproc.inc
  $081BD4C4  TGTKWIDGETSET__CREATESIMPLECLIENTAREAWIDGET,  line 4836 
of 
/usr/src/packages/BUILD/lazarus-0.9.23/lazarus/lcl/interfaces/gtk/gtkobject.inc
  $081BDEBC  TGTKWIDGETSET__CREATECOMPONENT,  line 5205 
of 
/usr/src/packages/BUILD/lazarus-0.9.23/lazarus/lcl/interfaces/gtk/gtkobject.inc
  $08193DB3  TGTK2WIDGETSET__CREATECOMPONENT,  line 305 of gtk2object.inc
  $08191B33  TWSWINCONTROL__CREATEHANDLE,  line 157 
of ./widgetset/wscontrols.pp
  $08128CF2  TWINCONTROL__CREATEWND,  line 5231 of ./include/wincontrol.inc
  $081289A3  TWINCONTROL__CREATEHANDLE,  line 5162 of ./include/wincontrol.inc
Call trace for block $4008E920 size 68

... etc


so you don't get something like this ?

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to