MacOs Sequoia 15.6.1
My Inverter logging app is progressing well but . . . under testing I have found a significant memory problem, unlike anything I have encountered yet, "Application paused Out of Application memory". When application fails MacOs reports application memory approx 140Gb! and that is roughly the amount of free disk space on my Mac.
Do I have memory leaks? Yes, 17 unfreed blocks. Used debug mode and managed to get this down to 9 blocks. The remainder are still present but the limited line info points toward stuff that is not in my code. I began to compare the failing program with a prototype that does not have the unfreed blocks. The main difference is Charts so that is where I started my investigation.
I created a new project containing a single TChart with a single LineSeries. Compile. Run from terminal and on exit 3 unfreed blocks, 2 for the chart, 1 for the LineSeries. Adding a second chart does not increase the unfired blocks. First part of the dump is below.
Heap dump by heaptrc unit of /Volumes/MacHD-SSD-Data/LocBucket/FpLazStuff/ZTest/project1
2473 memory blocks allocated : 1238099/1241992
2470 memory blocks freed : 1237971/1241864
3 unfreed memory blocks : 128
True heap size : 983040 (96 used in System startup)
True free heap : 982176
Should be : 982240
Call trace for block $00000001EA773E00 size 48
$000000010FE9DFE1
$000000010FD2A496
$000000010FD19B0A
$000000010FD1A14A
$000000010FD1AEC0
$000000010FD1E9DA
$000000010FD1EC89
$000000010FF75409
$000000010FF3F9A5
$000000010FF8B2B2
$000000010FF7FA94
$000000010FF0AE9F
$000000010FF0D334
$000000010FF049E1
$000000010FF0177E
$000000010FF044AD
I don't recall seeing anything in the documentation about needing to free charts or series. Perhaps someone can verify my findings or explain what is happening? I don't have access to Windoze to test but I do wonder if this is a Mac thing