• 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: Cocoa-dev Digest, Vol 3, Issue 91
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: cocoa interact with finder
  • Next by Date: Re: cocoa interact with finder
  • Previous by thread: Re: NSBundle path functions don't work after moving .app ?
  • Next by thread: Some confusion on memory management
  • Index(es):
    • Date
    • Thread