• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: setMenu: nil does not release a menu ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setMenu: nil does not release a menu ?


  • Subject: Re: setMenu: nil does not release a menu ?
  • From: lbland <email@hidden>
  • Date: Thu, 22 May 2003 11:05:06 -0400

On Thursday, May 22, 2003, at 10:34 AM, Tobias Hermann wrote:

[aView setMenu: nil]; does NOT release aMenu again.

Is this normal ? I get unwanted memory leaks that way! I want to release my menu properly when I don't need it anymore!

download this app:

http://www.vvi.com/~lbland/testApp.gz

that shows what is going on. click test then report

when you send setMenu:nil then the view menu is released in a global queue. that means it is released in the future, i.e.: after you tested to see if it is released. you need to test the retainCount in the future, not immediately after the method call.

digging into retain/release contexts is tricky...

-lance

Lance Bland
mailto:email@hidden
VVI
888-VVI-PLOT
http://www.vvi.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >setMenu: nil does not release a menu ? (From: Tobias Hermann <email@hidden>)

  • Prev by Date: Re: setMenu: nil does not release a menu ?
  • Next by Date: Re: Charting solutions
  • Previous by thread: Re: setMenu: nil does not release a menu ?
  • Next by thread: Re: setMenu: nil does not release a menu ?
  • Index(es):
    • Date
    • Thread