I am new to Cocos2D and I am currently playing with Cocos2Dx on the iOS SDK.
Based on the HelloWorld App I have made some additions by loading a captured image (using the Cinder lib) and transforming it into a CCTexture2D for a sprite. But it seems that the Texture setup method is causing a memory leak, so that the app is crashing after some time. The following code shows the update method, which is called by
//Capture a cam image
surf1 = capture.getSurface.clone;
uint8_t thr = round;
//Perform edge detection
//Perform a threshold
//get data dimensions
CCSize ssize, surf1.getHeight);
//THIS LINE IS CAUSING THE MEMORY LEAK
texture1.initWithData, kCCTexture2DPixelFormat_RGBA8888, surf1.getWidth, surf1.getHeight, ssize);
Can anybody help me?