Project

General

Profile

« Previous | Next » 

Revision 05ecc6fe

Added by Leszek Koltunski about 7 years ago

Major:

1) in the Library, fix the fact that some applications (those that were creating their DistortedSurface objects outside of onSurfaceCreated or onSurfaceChanged) would not render after the activity went to background (press POWER to see that).
2) in the Apps, call the new 'Distorted.onPause()' API to fix the above problem

The above fixes the problem, but it still leaks memory if an App creates its Surface in onSurfaceCreated/Changed (precisely: it leaves the old Surface in the DistortedSurface Map). Thus

3) Fix the first 15 Apps to avoid the memory leak. Next Apps coming.

View differences:

src/main/java/org/distorted/library/Distorted.java
123 123
    mInitialized = true;
124 124
    }
125 125

  
126
///////////////////////////////////////////////////////////////////////////////////////////////////
127
/**
128
 * Call this so that the Library can release its internal data structures.
129
 * Must be called from Activity.onPause().
130
 */
131
  public static void onPause()
132
    {
133
    DistortedSurface.onPause();
134
    }
135

  
126 136
///////////////////////////////////////////////////////////////////////////////////////////////////
127 137
/**
128 138
 * Call this so that the Library can release its internal data structures.

Also available in: Unified diff