Will it use more and more memory if I keep drawing on the UIView?

Posted by Tattat on Stack Overflow See other posts from Stack Overflow or by Tattat
Published on 2010-04-05T11:00:49Z Indexed on 2010/04/05 11:03 UTC
Read the original article Hit count: 230

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 .

© Stack Overflow or respective owner

Related posts about memory-management

Related posts about cgcontext