Skip to content

[Linux, FPC] Memory leaks #152

@rchastain

Description

@rchastain

Hello!

I rewrote in Pascal several C++ examples and games: SplashKit Pascal examples

When I compile with -gh option, I see that all the programs have memory leaks. I don't know whether it comes from the library or from my programs.

Even this very simple example has a (small) memory leak.

[roland@localhost drawing]$ skm fpc program -ghl
Free Pascal Compiler version 3.2.0 [2020/07/05] for x86_64
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling program.pas
Linking program
16 lines compiled, 0.4 sec
🎉  fpc command run successfully 🎉
[roland@localhost drawing]$ ./program
Heap dump by heaptrc unit of /home/roland/Documents/pascal/splashkit/drawing/program
5 memory blocks allocated : 88/96
4 memory blocks freed     : 73/80
1 unfreed memory blocks : 15
True heap size : 65536
True free heap : 65312
Should be : 65328
Call trace for block $00007F2624A3B2C0 size 15

Regards.

Roland

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions