Monday, March 12, 2012

[android-developers] Wich is the best way to destroy a GLSurfaceview and free all the memory?

I have a GLSurfaceView with four polygons with textures.

I need to destroy the GLSurfaceview and recreate a new GLSurfaceView with new parameters when the user press a button.

I tryed with myGLSurfaceView = null and initializing again myGLSurfaceView with the new paramters, but it is giving me VM budget bitmnap exception. I dont understand why, because i am doing recicle() on all the bitmaps i use.

So, i think that i need to destroy all the polygons of my glsurfaceview and my glsurfaceview before tho recreating a new glsurfaceview.

Wich is the correct way to achieve this?

Thanks

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment