title: Objective C: Received Memory Warning on ARC
body: <p>I am having memory warning with my app then it crashes. The error, I think is on my draw-on-touch feature, because when I tried to run it with the alloc instrument the memory starts increasing when i keep on moving my finger on the screen.</p>
  
  <p>Here's my code.</p>
  
  <pre><code>    touchSwiped = YES;
  
      UITouch *touch = [touches anyObject];
  
      previousPoint2 = previousPoint1;
      previousPoint1 = currentTouch;
      currentTouch = [touch locationInView:self.view];
  
      CGPoint mid1 = midPoint(previousPoint2, previousPoint1); 
      CGPoint mid2 = midPoint(currentTouch, previousPoint1);
  
      UIGraphicsBeginImageContext(CGSizeMake(480 , 320));
      [drawView.image drawInRect:CGRectMake(0, 0, 480,320)];  
  
      CGContextRef context = UIGraphicsGetCurrentContext();    
  
      CGContextSetLineCap(context,kCGLineCapRound);
      CGContextSetLineWidth(context, inkWidth);
      CGContextSetBlendMode(context, blendMode);
      CGContextSetRGBStrokeColor(context,redColor, greenColor, blueColor, 1);
      CGContextBeginPath(context);
      CGContextMoveToPoint(context, mid1.x, mid1.y);
      CGContextAddQuadCurveToPoint(context, previousPoint1.x, previousPoint1.y, mid2.x, mid2.y);
      CGContextStrokePath(context);
  
      drawView.image = UIGraphicsGetImageFromCurrentImageContext();
      UIGraphicsGetCurrentContext();
  </code></pre>