jPCT-AE - a 3d engine for Android > Support

OutOfMemoryError Exception

(1/1)

smither:
Giving the fact the Engine destroy the glContext when the activity goes to the background I try to reload everything again for the next time but I get an OutOfMemoryError Exception.

Anyone else had run on this issue?

EgonOlsen:
If you want to reload everything, make sure that no references to the former instances are left. destroy, flush, close and null everything before reloading. Apart from that, you don't have to reload. All you need is a new FrameBuffer instance, make the Textures keep their pixel data (there is a method for this) and some copy-magic. There is a thread here somewhere in the AE forum that mentions what i did in AlienRunner. It might be the AlienRunner thread itself, but i'm mot sure..

Navigation

[0] Message Index

Go to full version