Recent

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

dbannon

  • Hero Member
  • *****
  • Posts: 2794
    • 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 ! https://bugs.freepascal.org/view.php?id=35400

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

Code: [Select]
./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
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018