I turned on the static analyzer, but it tells me that at the end of this execution path this object is not freed, which is possibly causing a memory leak. However, I pass this link to the created object to another class that will release it. I was wondering if there is a way or keyword to tell the compile that I will release this object later.
I am looking for something like an auto release.
By the way, I use ARC.
I create an object as follows:
CGMutablePathRef pathRef = CGPathCreateMutable();
And pass it like this:
self.flowView.pathToDraw = pathRef;
In my flowView class, I have this method that will issue it.
-(void) setPathToDraw:(CGMutablePathRef) newPath { if(pathToDraw!=NULL) CGPathRelease(pathToDraw); pathToDraw=newPath; [self setNeedsDisplay]; }
I already tried looking at the GCPath documentation, but I had no luck.
thanks
source share