i'v found one solution, the key point is that if you destroy GLSurfaceView before it stops running,it will raise errors(not responsible) i have used to destroy the GLSurfaceView immediately followed by GLSurfaceView.onPause , the GLSurfaceView hasn't stoped runnnig at that time ,and not destroyed the EGL enviroment(something like EGLSurface,EGLContext...and so on).
so i use "postDelayed" to do that things about 50 millisecond later. it works well! but that seems not a very good approach for me ,because 50 millisecond is just a probably estimation. maybe 30 or 20 could also work . On 12月3日, 上午10时17分, LemonDev <[email protected]> wrote: > what puzzle me so much is that i can't destroy a GLSurfaceView while i > don't want to exit the activity. > > the fact is when i destroy a GLSurfaceView which had show in the screen > (that means it has binded to the activity's SurfaceHolder), the > activity exits without any prompting. Perhaps ,the Context which > provided in the Construction of GLSurfaceView joins the two things > together. > > so my conclusion is that a GLSurfaceView can only be destroyed when > exit the activity. > > is there anyway to destroy a GLSurfaceView without exit activity? > is there someone can provide a clue? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

