[mono-android] Disposing method in View

Tomasz Cielecki tomasz at ostebaronen.dk
Mon Jun 18 14:40:33 UTC 2012


The bitmap itself has a Recycle() method this can be used to tell the
Java GC that the object has been disposed.

You can override the Finish() method in your activity to dispose the
objects you don't need anymore.

On Mon, Jun 18, 2012 at 4:16 PM, Matthew Leibowitz
<mattleibowmail at gmail.com> wrote:
> Hi all,
>
> As my last question suggested, I am working with images. I cache the lo res
> in an array member of a view, but how do I dispose of the images?
> I tried overriding the Dispose(bool) method, but that doesn't seem to be
> called when the Activity is closed.
>
> What am I doing wrong? :) Is there another method/place?
>
> The "dispose" should be called when the containing activity is closed, but I
> don't want either the Activity or the View to know about each other.
> This is because they are used in a few places, but in slightly different
> ways.
>
> Matthew
>
> _______________________________________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>



-- 
Med Venlig Hilsen / With Best Regards
Tomasz Cielecki
http://ostebaronen.dk


More information about the Monodroid mailing list