Author Topic: OutOfMemoryError Exception  (Read 2972 times)

Offline smither

  • byte
  • *
  • Posts: 13
    • View Profile
OutOfMemoryError Exception
« on: September 20, 2010, 09:28:07 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: OutOfMemoryError Exception
« Reply #1 on: September 20, 2010, 10:40:08 pm »
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..