View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0035400||Lazarus||LCL||public||2019-04-17 01:38||2019-10-21 12:44|
|Reporter||David||Assigned To||Dmitry Boyarintsev|
|Product Version||2.0.2||Product Build|
|Target Version||Fixed in Version|
|Summary||0035400: TBitBtn has a Memory Leak on Cocoa|
|Description||If you assign a bitmap to the glyph property of a bitbtn it leaks memory. OK if no glyph. Speedbutton OK.|
|Steps To Reproduce||Build attached demo, and run from command line to see heaptrc output. As Mac apps don't seem to send heaptrc output via lazlogger you need to do something like -|
(open project1.app --args "--debug-log=/Users/dbannon/Pascal/MemLeak/log.log" no longer seems to get the heaptrc output - another issue ? )
|Additional Information||Clear the TBitBtn glyph and the leak goes away.|
This problem appears in both Lazarus 2.0.0 and 2.0.2
|Tags||No tags attached.|
|Fixed in Revision||61160|
project1.zip (129,896 bytes)
I tried to get that source code to work on WIn10, I don't have a MAC but
I couldn't see any place where you are actually assigning the bitmap? Maybe
you posted the wrong example?
In anycase, did you free the source of the bitmap ? Assigning an image in
most cases does not free the source of that image, you must do that.
would be interesting to hear more.
I set the bitmap using the object inspector. Click on the TBitBtn, go to object inspector and, under properties, Glyph, 'load'.
So, the bitmap should be set when you open the project, does the BitBtn have a little notebook image ?
Its all good on Windows by the way, no leaks !
Jamie, you are right, I stupidly made my zip file AFTER removing the image as a test. Have attached a new zip with its image in the TBitBtn.
Note, you will need to run the app initially from within the IDE to create your own app file, my ide is ignoring my request to include the app file in the zip.
project2.zip (130,044 bytes)
||please test and close if ok|
||Yep, all fixed, thanks|
|2019-04-17 01:38||David||New Issue|
|2019-04-17 01:38||David||File Added: project1.zip|
|2019-04-17 03:42||jamie philbrook||Note Added: 0115574|
|2019-04-17 03:43||jamie philbrook||Note Edited: 0115574||View Revisions|
|2019-04-17 06:00||David||Note Added: 0115578|
|2019-04-17 07:20||David||Note Added: 0115579|
|2019-04-17 08:08||David||File Added: project2.zip|
|2019-05-05 20:53||Dmitry Boyarintsev||Assigned To||=> Dmitry Boyarintsev|
|2019-05-05 20:53||Dmitry Boyarintsev||Status||new => resolved|
|2019-05-05 20:53||Dmitry Boyarintsev||Resolution||open => fixed|
|2019-05-05 20:53||Dmitry Boyarintsev||Fixed in Revision||=> 61160|
|2019-05-05 20:53||Dmitry Boyarintsev||LazTarget||=> -|
|2019-05-05 20:53||Dmitry Boyarintsev||Widgetset||Cocoa => Cocoa|
|2019-05-05 20:53||Dmitry Boyarintsev||Note Added: 0116026|
|2019-10-21 12:44||David||Status||resolved => closed|
|2019-10-21 12:44||David||Note Added: 0118751|