Will it use more and more memory if I keep drawing on the UIView?
- by Tattat
This is my drawRect:
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 2.0);
CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);
CGContextMoveToPoint(context, x1, y1);
CGContextAddLineToPoint(context, x2, y2);
CGContextStrokePath(context);
If I run this code thousand times or more. My UIView will have many lines on that. Will it use more memory than only just one line on it? Er... ...I mean, will the program remember the line I draw or after it draw the lines, it won't have any information in the memory. thz .