Re: Cocoa-dev Digest, Vol 3, Issue 91
Re: Cocoa-dev Digest, Vol 3, Issue 91
- Subject: Re: Cocoa-dev Digest, Vol 3, Issue 91
- From: Gorazd Krosl <email@hidden>
- Date: Fri, 20 Jan 2006 09:27:01 -0500 (EST)
This is not directly related to the original question,
but I found out hard way that
-applicationWillTerminate: is called too early for my
needs in document based application. I am using
Berkeley DB and have a global "environment" for all
database handles opened by application delegate. It
has to be closed after all databases close when
application quits. Well, if there are any documents
opened when app is quitting,
-applicationWillTerminate: is called before documents'
-dealloc or -close methods are called. So, if I close
environment on -applicationWillTerminate:, there are
still dahabase handles registered to it open and
Berkeley DB does not like this much. I ended up
registering with atexit() to close the environment.
Sometimes -applicationWillTerminate: is not the best
place to do a cleanup.
Gorazd
------------------------------
Message: 12
Date: Fri, 20 Jan 2006 03:46:32 -0800
From: "John C. Randolph" <email@hidden>
Subject: Re: NSApplication terminate: behavior
To: Andreas F?rber <email@hidden>
Cc: email@hidden
Message-ID:
<email@hidden>
Content-Type: text/plain; charset=US-ASCII;
format=flowed
What do you want to do that you can't do in
-applicationWillTerminate:?
-jcr
__________________________________________________________
Find your next car at http://autos.yahoo.ca
_______________________________________________
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