Recent

Author Topic: Memory leak  (Read 2147 times)

bytebites

  • Hero Member
  • *****
  • Posts: 640
Memory leak
« on: September 17, 2017, 12:09:46 pm »
There is memory leak in function GetFineClearTypeAuto of BGRAText.pas. Line 419

Code: Pascal  [Select][+][-]
  1. bgra:= BGRABitmapFactory.Create(lclBmp);

but no corresponding free.

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: Memory leak
« Reply #1 on: September 17, 2017, 02:58:01 pm »
I think  %) that call is not a call to a constructor create... but to a factory create function.... I am not sure, but then check if you can prove the leak...
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: Memory leak
« Reply #2 on: September 18, 2017, 08:16:26 am »
Indeed, a Free is required. I fixed it on dev-bgrabitmap branch.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018