Browse Source

+ Fix from Mattias Gaertner, closes memory leak

michael 22 years ago
parent
commit
10d28cc837
2 changed files with 19 additions and 2 deletions
  1. 5 1
      fcl/inc/classes.inc
  2. 14 1
      fcl/inc/cregist.inc

+ 5 - 1
fcl/inc/classes.inc

@@ -1171,6 +1171,7 @@ begin
   GlobalFixupList.Free;
   GlobalFixupList.Free;
   GlobalFixupList := nil;
   GlobalFixupList := nil;
   GlobalLists.Free;
   GlobalLists.Free;
+  ComponentPages.Free;
   {!!!: GlobalNameSpace.Free;
   {!!!: GlobalNameSpace.Free;
   GlobalNameSpace := nil;}
   GlobalNameSpace := nil;}
 end;
 end;
@@ -1190,7 +1191,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.11  2002-12-02 12:04:07  sg
+  Revision 1.12  2003-04-19 14:29:25  michael
+  + Fix from Mattias Gaertner, closes memory leak
+
+  Revision 1.11  2002/12/02 12:04:07  sg
   * Fixed handling of zero-length strings (classes.inc: When converting
   * Fixed handling of zero-length strings (classes.inc: When converting
     empty strings from text forms to binary forms; reader.inc: When reading
     empty strings from text forms to binary forms; reader.inc: When reading
     an empty string from a binary serialization)
     an empty string from a binary serialization)

+ 14 - 1
fcl/inc/cregist.inc

@@ -113,7 +113,17 @@ type
   public
   public
     Name: String;
     Name: String;
     Classes: TList;
     Classes: TList;
+    destructor Destroy; override;
   end;
   end;
+
+{ TComponentPage }
+
+destructor TComponentPage.Destroy;
+begin
+  Classes.Free;
+  inherited Destroy;
+end;
+  
 var
 var
   ComponentPages: TCollection;
   ComponentPages: TCollection;
 
 
@@ -187,7 +197,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.4  2002-09-07 15:15:24  peter
+  Revision 1.5  2003-04-19 14:29:25  michael
+  + Fix from Mattias Gaertner, closes memory leak
+
+  Revision 1.4  2002/09/07 15:15:24  peter
     * old logs removed and tabs fixed
     * old logs removed and tabs fixed
 
 
 }
 }