xamarin.ios - MonoTouch: proper way to handle ReceiveMemoryWarning -


i have monotouch app out in wild dies mprotect errno 12 (out of memory), , seems @ least 1 receivememorywarning notification beforehand.

i'm wondering right way respond is. there 2 types of things app free: opengl textures , managed memory.

my questions are:

  1. opengl textures: deleting opengl textures help?

  2. managed memory: can't free directly, can null out references it. enough?

  3. gc.collect: should call gc.collect() @ end of handler? gc.collect immediately, or schedule collection future?

  4. anything else can/should in response this?

i ran while in app using opengl. me, memory leak.

[dllimport("/system/library/frameworks/coregraphics.framework/coregraphics")] public static extern void cgdataproviderrelease(intptr provider);

and after call gl.teximage2d.....

you need call cgdataproviderrelease(data.handle);

now being said, might want @ this:

http://forums.monotouch.net/yaf_postst1541.aspx


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -