title: OpenGL causes memory leaks
body: <p>I have an OpenGL ES activity and for some reason it causes memory leaks even after commenting almost every line. This is the remaining code</p>
  
  <p>The .h file</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;GLKit/GLKit.h&gt;
  
  @interface PlayMain : GLKViewController &lt;UIAccelerometerDelegate&gt;{ }
  
  @end
  </code></pre>
  
  <p>The .m file</p>
  
  <pre><code>@interface PlayMain ()
  {
  
  }
  
  @property (strong, nonatomic) EAGLContext *context;
  @property (strong, nonatomic) GLKBaseEffect *effect;
  
  @end
  
  @implementation PlayMain{}
  
  @synthesize context = _context;
  @synthesize effect = _effect;
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];
      if (!self.context)
      {
          NSLog(@"Failed to create ES context");
      }
  
      GLKView *view = (GLKView *)self.view;
      view.context = self.context;
      view.drawableDepthFormat = GLKViewDrawableDepthFormat24;
      [EAGLContext setCurrentContext:self.context];
  }
  
  - (void)glkView:(GLKView *)view drawInRect:(CGRect)rect
  {
  }
  </code></pre>
  
  <p>After about 10-20 switches between the openGL activity and another one(it contains 3 labels and one button which creates a segue back to the openGL activity) the app receives a memory warning. If I continue then after a few more switches the process is terminated. Am I missing something?</p>
  
  <p>Also the device on which I am testing is an ipod4 and I am using ARC in the project settings.</p>