Getting weird message


#1

I’m getting a weird message on the console when running my gold challenge:
“CGContextResetState: invalid context 0x8d1c980. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.”

It works fine the first time but when i try to add touch events the app crashes.

Anyone know what this is?


#2

Fixed it:

I had to remove this line, which i added by mistake at the end of drawRect:
CGContextRelease(currentContext);

It was causing premature deallocation of the graphics context