Project

General

Profile

« Previous | Next » 

Revision 54342a21

Added by Leszek Koltunski over 3 years ago

Plug two more memory leaks.

View differences:

src/main/java/org/distorted/objects/Cubit.java
31 31
  {
32 32
  private final Static3D mOrigPosition;
33 33
  private final Static3D mCurrentPosition;
34
  private final TwistyObject mParent;
34
  private TwistyObject mParent;
35 35
  private final int mNumAxis;
36 36

  
37 37
  int mQuatIndex;
......
204 204
    computeRotationRow();
205 205
    }
206 206

  
207
///////////////////////////////////////////////////////////////////////////////////////////////////
208

  
209
  void releaseResources()
210
    {
211
    mParent = null;
212
    }
213

  
207 214
///////////////////////////////////////////////////////////////////////////////////////////////////
208 215

  
209 216
  float getDistSquared(float[] point)
src/main/java/org/distorted/objects/TwistyObject.java
519 519
  public void releaseResources()
520 520
    {
521 521
    mTexture.markForDeletion();
522
    mMesh.markForDeletion();
523
    mEffects.markForDeletion();
524

  
525
    for(int j=0; j<NUM_CUBITS; j++)
526
      {
527
      CUBITS[j].releaseResources();
528
      }
522 529
    }
523 530

  
524 531
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff