• 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: Objective C++ memory management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective C++ memory management


  • Subject: Re: Objective C++ memory management
  • From: Garvin Haslett <email@hidden>
  • Date: Tue, 1 Nov 2005 22:39:30 +0000

On 1 Nov 2005, at 18:51, Nick Zitzmann wrote:


On Nov 1, 2005, at 11:00 AM, Garvin Haslett wrote:

You are correct, which leaves me mystified. I thought that Cmd-Q or clicking the red button on the window would automatically force a call to dealloc. Clearly this is not the case. Can anyone clear up my confusion.

Top level objects in the main nib file aren't deallocated when the program quits. You generally don't need to worry about deallocating objects when the application quits, because the memory is going to be freed anyway. If you need to do something before the application quits, then you should use the NSApplication delegate method -applicationWillTerminate:.


Nick Zitzmann
<http://www.chronosnet.com/>




Ok, in this case I don't have a problem, this is only a single window application with a single QuartzView in that window.


Now, i'm imagining a problem for the future: What happens if I create a new version which allows the user to open and close multiple windows via the Menuba. Each one of these windows will own a QuartzView and therefore each one will allocate their own BitMapMgr. Will this scenario lead to a lot of leaks or are the windows managed differently in this scenario?

Garvin.



___________________________________________________________ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Objective C++ memory management
      • From: "Joshua D. Orr" <email@hidden>
References: 
 >Re: Objective C++ memory management (From: Garvin Haslett <email@hidden>)
 >Re: Objective C++ memory management (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: nested autorelease pools?
  • Next by Date: Re: Changes in CoreData/10.4.3?
  • Previous by thread: Re: Objective C++ memory management
  • Next by thread: Re: Objective C++ memory management
  • Index(es):
    • Date
    • Thread