Author Topic: Memory Leak in TBitBtn and heaptrc on Cocoa  (Read 552 times)


  • Hero Member
  • *****
  • Posts: 1214
    • tomboy-ng, a rewrite of the classic Tomboy
Memory Leak in TBitBtn and heaptrc on Cocoa
« on: April 17, 2019, 01:57:27 am »
I have just logged an bug report about a memory leak in TBitBtn, care needed !

But 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 -

Code: [Select]
open --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 -

Code: [Select]
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.

Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project -


TinyPortal © 2005-2018