Drawing a grid in UIScrollView's subview allocates huge memory
I'm trying to create a UIView in UIScrollView that contains just a simple grid (lines as rows and columns) drown by UIBezierPath or using the CG functions. The problem is, that when I have larger content size of the UIScrollView (as well as the larger subview), during the drawing of the grid huge amount of memory is allocated (50MB or more). UIViewController which includes just UIScrollView over whole scene - adding subview in viewDidLoad: @interface TTTTestViewController() @property (weak, nonatomic) IBOutlet UIScrollView *scrollView; @end @implementation TTTTestViewController -(void