فهرست منبع

* fix memleak in fpcanvas. Patch by wp, mantis #24427 attempt two

git-svn-id: trunk@24555 -
marco 12 سال پیش
والد
کامیت
80b52b2a6a
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      packages/fcl-image/src/fpcanvas.inc

+ 1 - 1
packages/fcl-image/src/fpcanvas.inc

@@ -19,7 +19,6 @@ constructor TFPCustomCanvas.Create;
 begin
   inherited create;
   FClipping := false;
-  FreeAndNil(FClipRegion);
   FRemovingHelpers := false;
   FHelpers := TList.Create;
   FDefaultFont := CreateDefaultFont;
@@ -29,6 +28,7 @@ end;
 
 destructor TFPCustomCanvas.Destroy;
 begin
+  FreeAndNil(FClipRegion);
   FRemovingHelpers := True;
   // first remove all helper references
   RemoveHelpers;