2
나는 문제를 해결하는 방법을 모르겠다. "analysis"를 사용하여 메모리 문제로 인해 프로그램이 충돌하고 7 가지 유사한 표기법 중 첫 번째 표기법은 "Signalline에 저장된 객체의 잠재적 누출"이 CGContextStrokePath (signalContext)로 conected 된 것입니다. CoreFoundation Ownership Policy에 따르면루프에서 CGGraphics를 사용하는 동안 객체의 누출 가능성
- (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
}
}
! 빠른 솔루션을위한 타이 –