So my take on this is not only can I not COUNT on deleteOnExit()
behaving properly but I can basically count on it never being called.

This raises one more question which might need a separate thread - is
it ever right for an application to call System.exit(). We are trained
not to do this but for an application which is finished is this a
reasonable way to terminate?

On Mar 29, 2:04 pm, fadden <[email protected]> wrote:
> On Mar 29, 11:33 am, Mark Murphy <[email protected]> wrote:
>
> > > 2) When does an Application's JVM exit - assuming there is one JVM per
> > > application.
>
> > That is unclear and definitely varies. For example, the process may be
> > terminated quickly enough that the JVM does not go through a normal
> > shutdown procedure. In other words, I would not rely upon deleteOnExit.
>
> It's actually much simpler than that: apps don't "exit normally", they
> just get quiesced and killed.
>
> Unless somebody calls System.exit(), exit processing won't happen.  Of
> course, on Linux, you can delete an open file and get the desired
> behavior anyway.
>
> (If you run "adb shell am", logcat will show a bunch of babbling as
> the VM in the "am" process shuts down.  You'll never see this for an
> app process.)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to