title: Got [Not A Type class]: message sent to deallocated instance error?
body: <p>I am working on this issue for a long time and can not get an answer, hope someone can help me out.</p>
  
  <p>I have a ios ARC based app. It's strange that I got "[Not A Type class]: message sent to deallocated instance" from the below code only in iphone then the app just crashed, although it is working well in the simulator. I understand that it could be memory issue, but can not figure out why. After searching the forum, it seems it's related to CGColorRef, but I can not find the simliar case.</p>
  
  <pre><code>self.backgroundColor =  CMConstants.greyColor;
  CGContextRef context = UIGraphicsGetCurrentContext();
  CGColorRef separatorColor = [UIColor colorWithRed:12/255.0 green:12/255.0 blue:12/255.0     alpha:1.0].CGColor;
  CGRect paperRect = self.bounds;
  </code></pre>