Git Product home page Git Product logo

Comments (8)

lainz avatar lainz commented on July 3, 2024 2

Reported:
https://gitlab.com/freepascal.org/fpc/source/-/issues/40126

from bgracontrols.

lainz avatar lainz commented on July 3, 2024 2

Seems that they fixed it in new record time!

from bgracontrols.

circular17 avatar circular17 commented on July 3, 2024 1

I have the impression that the memory leak is limited to TXMLConfig class and XML functions it uses. So I suppose we can do a test project that only requires TXMLConfig.

program testxmlconf;

uses XMLConf, sysutils;

var
  cfg: TXMLConfig;
  filename: string;

begin
  filename := ExtractFilePath(ParamStr(0))+'temp.xml';

  cfg := TXMLConfig.Create(nil);
  cfg.SaveToFile(filename);
  cfg.Free;

  cfg := TXMLConfig.Create(nil);
  cfg.LoadFromFile(filename);
  cfg.Free;
end.

It results indeed in the same memory leak:

Heap dump by heaptrc unit of /Users/johann/Documents/pascal/testxmlconf/testxmlconf
202 memory blocks allocated : 39538/40008
188 memory blocks freed     : 33542/34000
14 unfreed memory blocks : 5996
True heap size : 786432 (64 used in System startup)
True free heap : 777216
Should be : 777672
Call trace for block $0000000101846C00 size 38
Call trace for block $0000000101846000 size 32
Call trace for block $00000001017F5DB0 size 3080
  $000000010148F9FF
Call trace for block $0000000101846100 size 40
  $000000010148F9FF
Call trace for block $000000010183D600 size 84
Call trace for block $0000000101846400 size 32
Call trace for block $000000010183D740 size 98
Call trace for block $0000000101846300 size 32
Call trace for block $000000010183D880 size 96
Call trace for block $0000000101845E00 size 40
Call trace for block $00000001017F54D0 size 2048
Call trace for block $0000000101845F00 size 32
Call trace for block $000000010186D100 size 128
Call trace for block $0000000101865100 size 216

from bgracontrols.

lainz avatar lainz commented on July 3, 2024

Hi, I've added test_svg_theme project (so we can test the memory leak easily). And I've fixed a memory leak for bcfont in bgrasvgtheme.
The other bug is in bgrasvgimagelist, ReadData (line 110) and DefineProperties (line 189).

from bgracontrols.

lainz avatar lainz commented on July 3, 2024

The problem is that in the Lazarus bugtracker they will not accept this demo I made as test of the memory leak, because it requires bgrabitmap and bgracontrols.

from bgracontrols.

lainz avatar lainz commented on July 3, 2024

Ok. Do you want to report it? Or I do?

from bgracontrols.

circular17 avatar circular17 commented on July 3, 2024

Thank you very much

from bgracontrols.

rchastain avatar rchastain commented on July 3, 2024

Good!

from bgracontrols.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.