How to clear graphics context in order to free up memory?

JessicaBlueJessicaBlue USMember ✭✭
edited November 2 in Xamarin.iOS

Hello,

I have a ScrollView with a bunch of views in them. In each view I draw some graphics in the Draw method. I would like to clear these graphics when a view is not being displayed offscreen in the ScrollView. I know how to do the offscreen detection, but I don't know how to clear the graphics. The only thing I have found online is how to clear to transparent pixels, but that doesn't seem like it will do the job as I am still left with the same amount of pixel data in memory. I would like the resulting internal canvas size to be 0 by 0, or 1 by 1...

Sign In or Register to comment.