Project

General

Profile

« Previous | Next » 

Revision 8d98b65f

Added by Leszek Koltunski over 2 years ago

Move destroying most of statics from onDestroy() earlier, to onPause().

Reason: doing this in onDestroy() is too late, because when we have two activities, and switch between them, first the ending's Activity onPause() is called, then the starting Activity's onResume, then it's onSurfaceCreated(), then we insert all the effects, and only then the ending Activity onDestroy() gets fired off - and this might destroy the already enabled effects, like for example the Programs of the Postprocessing effects.

View differences:

src/main/java/org/distorted/library/mesh/DeferredJobs.java
401 401
 *
402 402
 * @y.exclude
403 403
 */
404
  public static void onDestroy()
404
  public static void onPause()
405 405
    {
406 406
    int num = mJobs.size();
407 407

  

Also available in: Unified diff