New topic: 

Menubar references increasing infinitely?

<http://forums.realsoftware.com/viewtopic.php?t=34282>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        dbronson          Post subject: Menubar references increasing 
infinitely?Posted: Tue Jun 15, 2010 10:40 am                         
Joined: Mon Sep 21, 2009 9:33 am
Posts: 4                I sometimes use Roman Eisele's old Debug Window from 
years ago.  It still works, and sometimes shows me things I don't usually 
bother checking.  I was playing around with it in an app of mine, looking at 
memory usage and reference counts, etc….  I noticed that whenever I click the 
menubar of my app, the reference count for the main menu increases by two or 
three, and memory creeps up a little.

Curious, I decided to isolate this into a new project in RB Studio 2010r2.  To 
the default desktop application, I added one menu called "Test" in the file 
menu.  I added Roman's object list from DebugWindow, and told my menu to update 
the list.  I also stuck a timer in there to force the list to update several 
times per second.

Lo and behold, every time I invoke my test menu, the reference count for the 
main menu increments by three, and one of the menu item objects increases by 
one.  Even when I just click on the menubar without selecting anything, the 
reference count for the main menubar increments by two.  Also, I just thought 
about sticking an "EnableMEnuItems" in the action event of the timer.  The 
reference count of the main menubar is at 600 and counting.

Seems like some kind of leak.  Is this something I'm doing, something I'm not 
doing, or a bug?   
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to