Small memory leak in any project using ptcGraph
Original Reporter info from Mantis: Roland Chastain
-
Reporter name: Roland Chastain
Original Reporter info from Mantis: Roland Chastain
- Reporter name: Roland Chastain
Description:
If you compile any program using ptcGraph, and use heaptrc unit, you will see one unfreed memory block (48 bytes for FPC 64-bit, 28 bytes for 32-bit).
A user of the Lazarus forum has searched and found the origin of the memory leak. You can see the proposed modification here:
https://forum.lazarus.freepascal.org/index.php/topic,51934.msg382141.html#msg382141
Steps to reproduce:
Compile any program using ptcGraph, and use heaptrc unit.
Additional information:
I reproduce here the proposed modification:
destructor TPTCWrapperThread.Destroy;
begin
FSurfaceCriticalSection.free; // THIS WAS MISSING
inherited;
end;
Mantis conversion info:
- Mantis ID: 38003
- Version: 3.0.4
- Fixed in version: 3.3.1
- Fixed in revision: 47236 (#e4155ea9)
- Target version: 3.2.2