Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. @Override
  2. public void onBackPressed() { //--Alex I added this method to resolve some out of memory exception errors from repeated launching of Makers 12/20/2014
  3. super.onBackPressed();
  4.  
  5. // de-referencing objects to prevent memory leaks
  6.  
  7. mLastTool = null;
  8. mActiveTool = null;
  9.  
  10. mLastColor = null;
  11. mActiveColor = null;
  12.  
  13. mLastPenType = null;
  14. mActivePenType = null;
  15.  
  16. mDebugButton = null;
  17. mColorsView = null;
  18.  
  19. mActionBarView = null;
  20. mToolsView = null;
  21.  
  22. mLogoView = null;
  23. mComboHudView = null;
  24.  
  25.  
  26.  
  27. finish();
  28. overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out); // this line adds my nice custom transitions out of this MarkersActivity
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement