I have just logged an bug report about a memory leak in TBitBtn, care needed !
https://bugs.freepascal.org/view.php?id=35400But along the way, I find that heaptrc on Mac no longer send its output via lazlogger ?
For example, compile a cocoa app using a TBitbtn with an image and a debugln('debugln') line run it from command line using -
open project1.app --args "--debug-log=/some/path/log.log"
And you will see (eg) debugln() output but not heaptrc output. I suspect thats why no one has spotted that TBitBtn leak yet. Its getting too hard to check !
Instead, I found running -
./project1.app/Content/MacOS/project1
does show us the heaptrc output, is that a valid way to launch a Mac app ? From memory, some GUI components struggle to get focus when launched like this but my demo in the bug report appeared OK.
Davo