public void onDestroy() {
    renderer.clearSprites();

    if (canvasView != null) {
      canvasView.onStop();
    }
  }
  public void onPause() {
    if (glView != null) {
      glView.onPause();
    }

    if (canvasView != null) {
      canvasView.onStop();
    }
  }