View Issue Details

IDProjectCategoryView StatusLast Update
0035562LazarusLCLpublic2019-05-11 13:34
ReporterMartin FriebeAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platform64bit IntelOSwin 10OS Version10
Product Version2.1 (SVN)Product Build 
Target VersionFixed in Version2.0.4 
Summary0035562: Memleak in TCustomIcon.AssignImage
Descriptionhttps://forum.lazarus.freepascal.org/index.php/topic,45350.msg320663.html#msg320663

The following leaks. AssignInfo creates a temp object that is not freed.

    procedure TForm1.Button5Click(Sender: TObject);
    Var
      B:TbitMap;
      C:TCursorImage;
    begin
      B := TBitMap.Create;
      C := TCursorImage.Create;
      B.SetSize(320,240);
      B.Canvas.CopyRect(Rect(0,0,319,239),Canvas,Rect(0,0,319,239));{Comment this line, leaks go away}
      C.Assign(B); {or comment this line, leaks go away}
      B.Free;
      C.Free;
    end;
     
TagsNo tags attached.
Fixed in Revision61200,61201
LazTarget2.0.4
Widgetset
Attached Files

Activities

Martin Friebe

2019-05-11 13:34

manager   ~0116131

Please test, and close if ok

Issue History

Date Modified Username Field Change
2019-05-11 13:16 Martin Friebe New Issue
2019-05-11 13:16 Martin Friebe Status new => assigned
2019-05-11 13:16 Martin Friebe Assigned To => Martin Friebe
2019-05-11 13:34 Martin Friebe Status assigned => resolved
2019-05-11 13:34 Martin Friebe Resolution open => fixed
2019-05-11 13:34 Martin Friebe Fixed in Version => 2.0.4
2019-05-11 13:34 Martin Friebe Fixed in Revision => 61200,61201
2019-05-11 13:34 Martin Friebe LazTarget => 2.0.4
2019-05-11 13:34 Martin Friebe Note Added: 0116131