Hi,

Attached patch frees the items of the InitHandlerList. The items are allocated in RegisterInitComponentHandler, but never seem to be freeed.
Heaptrc showed a memleak, when you ran lazarus with the cgi package installed.


Regards,
Vincent
Index: rtl/objpas/classes/classes.inc
===================================================================
RCS file: /FPC/CVS/fpc/rtl/objpas/classes/classes.inc,v
retrieving revision 1.26
diff -u -r1.26 classes.inc
--- rtl/objpas/classes/classes.inc      13 Apr 2005 16:16:43 -0000      1.26
+++ rtl/objpas/classes/classes.inc      27 Apr 2005 06:44:21 -0000
@@ -1496,6 +1496,8 @@
   ComponentPages.Free;
   {!!!: GlobalNameSpace.Free;
   GlobalNameSpace := nil;}
+  for i := 0 to InitHandlerList.Count - 1 do
+    TInitHandler(InitHandlerList.Items[I]).Free;
   InitHandlerList.Free;
   InitHandlerList:=Nil;
   FindGlobalComponentList.Free;
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to