[Mono-bugs] [Bug 685215] Odd SurfaceView Touch Exception

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Aug 9 11:26:57 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=685215

https://bugzilla.novell.com/show_bug.cgi?id=685215#c10


Ramon Chan <chan.ramon at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chan.ramon at gmail.com

--- Comment #10 from Ramon Chan <chan.ramon at gmail.com> 2011-08-09 15:26:54 UTC ---
I also confirmed this bug and found this is more obvious when using
accelerometer.
Have a look in my case with bug id : 711286.
I also provided a simple "AccelerometerTest" project.


I can suggest a workaround for your case :
Define UpdateCount int member and in your while loop, add this code :

UpdateCount++;
if (UpdateCount == 200)
{
     GC.Collect(0);
     UpdateCount = 0;
}

This should solve the OnTouch problem by forcing manual GC Collection after
certain amount of updates (Something like 50 to 300). I chose 200. Don't make
it too often or too long. It really depends on how much garbage your app
generates for every update.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list