I have made an app with a small "bouncing ball" game using Androids canvas. The problem is that the game works fine and smooth except when the garbage collector kicks in which makes the game lag for a short while.
This happens about every fifth second and I get the following message when debugging:
[Mono] GC_MINOR: (Nursery full) pause 30.52ms, total 30.68ms, bridge 41.16ms promoted 912K major 1168K los 369K
I tried to increase the garbage collection size after reading other posts but without effect. I'm actually not sure if it kicked in at all. However I guess increasing the size just make the lag appear less often but it will be worse when it does?
Is there any good way to avoid this?