Don't rely on finalize() being called (at an even somewhat predictable
time).

Finalize is called by the garbage collector of every java Object. It
may be quite a while before finalize is called by the garbage
collector. Instead, implement the onDestroy.


On May 20, 3:42 am, Jiang <[email protected]> wrote:
> My application contains 2 activities A and B. B is opened with 
> startActivity(intent) in A, when B is closed with finish(), I found the 
> method finalize() of B is not called.
>
> My question is:
> How to force Activity to call finalize() when it is closed with finish()?
>
> Thanks.
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
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

Reply via email to