Re: Objective C++ memory management
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