Selaa lähdekoodia

Fix memory leak

Leandro Diaz 8 vuotta sitten
vanhempi
sitoutus
11a24a03b8
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      test/BGRA Ribbon Custom/uRibbon.pas

+ 2 - 0
test/BGRA Ribbon Custom/uRibbon.pas

@@ -115,6 +115,7 @@ begin
       r:=LazarusResources.Find('ribbon');
       r:=LazarusResources.Find('ribbon');
       bmp := TBGRABitmap.Create('back5.png');
       bmp := TBGRABitmap.Create('back5.png');
         ABitmap.PutImage(width-220,1,bmp,dmDrawWithTransparency);
         ABitmap.PutImage(width-220,1,bmp,dmDrawWithTransparency);
+      bmp.Free;
     end;
     end;
     except
     except
     end;
     end;
@@ -135,6 +136,7 @@ begin
     begin
     begin
       bmp := TBGRABitmap.Create('back5.png');
       bmp := TBGRABitmap.Create('back5.png');
       ABitmap.PutImage(width-300,-68,bmp,dmDrawWithTransparency);
       ABitmap.PutImage(width-300,-68,bmp,dmDrawWithTransparency);
+      bmp.Free;
     end;
     end;
     except
     except
     end;
     end;