I don't get it, how to solve the problem? I used "analyze" cause my program crashes due memory problems and the first one of seven similar notations is "Potential Leak of an Object stored into signalline" conected to CGContextStrokePath(signalContext);
- (void)drawHorizoLines{
for(int i = 1; i < self.frame.size.width/_sw;i++){
CGContextRef signalContext = UIGraphicsGetCurrentContext();
CGMutablePathRef signalLine = CGPathCreateMutable();
CGContextSetLineWidth(signalContext, 0.4); //LineWidth
CGContextBeginPath(signalContext);
CGContextSetStrokeColorWithColor(signalContext, [UIColor purpleColor].CGColor);
CGPathMoveToPoint(signalLine, 0, 0, i*_rowHeigth + _sbd/2);//Startpoint
CGPathAddLineToPoint(signalLine, 0, self.frame.size.width, i*_rowHeigth + _sbd/2);
CGContextAddPath(signalContext, signalLine);
//CGContextClosePath(signalLine); didnt work
CGContextStrokePath(signalContext);
//CGContextRelease(signalContext); didnt work
}
}