[mono-android] Possible GC Bug?

Konaju Games (Dev) dev at konaju.com
Tue Mar 29 19:36:47 EDT 2011


A common scenario on Windows Phone 7 games is to explicitly call
GC.Collect() between menu screens and just prior to starting gameplay to
minimize the chances of a GC happening in the middle of the game and causing
a 1-2 frame stall in the game (because the GC in WP7 does a full sweep).  I
understand the GC in MonoDroid may be different, but is calling GC.Collect()
in this manner a good or bad thing in MonoDroid?

Sly

On 30 March 2011 01:37, Miguel de Icaza <miguel at novell.com> wrote:

> > Thanks for your input Jon. So if I understand correctly, I should call
> > GC.Collect regularly? I don't see how to know what objects (assuming this
> > isn't exclusive to Bitmaps) are allocated in Dalvik and which ones
> aren't.
> > If that's the case, then I should call collect just in case there's
> > something that needs to be cleaned up.
>
> No.
>
> The document pattern is that developers should use the Dispose()
> method on objects that might be holding on to important resources
> (memory, network connections, license keys, file descriptors and other
> precious and finite resources)
> _______________________________________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110330/637eb7f5/attachment-0001.html 


More information about the Monodroid mailing list