Why not override the finalize method in Java?

protected void finalize() throws Throwable {}

Maybe stick a Log statement in there and put a breakpoint on the Log 
statement?

When it gets called, that's when it's ready for collection.


On Friday, July 20, 2012 9:10:11 AM UTC-5, rk wrote:
>
> I am  adding Custom Views  and each View has few Custom-listeners.
>
> Based on the User settings I will remove existing views and create/add new 
> views to the UI.
>
> My Question:
> When I remove/delete the view, does my Listener objects are eligible for 
> garbage collection or NOT ?
>
> I dont need the view and listener references any more, once user changes 
> the settings.
>
>
>
>

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

Reply via email to