I have a game that uses particlesystems. Each time the player finishes a level, either by failing or succeeding, he can choose to replay that level. I then remove all children and eventlisteners and rebuilds the level by adding them again.
What I have found is that for each iteration the memory keeps increasing, of course indicating a memory leak.
After digging through the issue using Xamarin Profiler I have narrowed it down to mostly being due to an increasing amount of unreleased EventHandlers, specifically the eventhandler that is assigned to LayerVisibleBoundsChanged in the setter for Layer in CCNode - and since I am using particle systems this EventHandler is set a lot.
Am I releasing the child nodes in the wrong way or should the Layer be set to null in CCNode.Cleanup (ie bug in CocosSharp)?