Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    • Menu
    Projects Groups Snippets
  • Get a free trial
  • Sign up
  • Login
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,086
    • Issues 2,086
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 10
    • Merge requests 10
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

GitLab 15.0 has launched! Please visit Breaking changes in 15.0 and 15.0 Removals to see which breaking changes may impact your workflow.

  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #35562
Closed
Open
Created May 11, 2019 by FPC Admin account@fpc_adminOwner

Memleak in TCustomIcon.AssignImage

Original Reporter info from Mantis: Martin @martin_frb
  • Reporter name: Martin Friebe

Description:

https://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;                                                  
     

Mantis conversion info:

  • Mantis ID: 35562
  • OS: win 10
  • OS Build: 10
  • Platform: 64bit Intel
  • Version: 2.1 (SVN)
  • Fixed in version: 2.0.4
  • Fixed in revision: 61200 (#5f6aa28d),61201 (#057100e3)
  • Target version: 2.0.4
Assignee
Assign to
Time tracking