Re: NSView out of memory problem
Re: NSView out of memory problem
- Subject: Re: NSView out of memory problem
- From: Gorazd Krosl <email@hidden>
- Date: Tue, 1 Apr 2008 09:43:10 -0400 (EDT)
Hi Leslie,
NSView does not store any drawing. If the code bellow
is
executed in the loop as you are indicating and
possibly several thousand times, each time through the
loop you are creating a new autoreleased NSBezierPath.
If this is the case, you should include
NSAutoreleasePool and drain or free it every so often;
maybe every 100 iterations, to get rid of accumulated
NSBezierPaths.
Hope that helps.
Gorazd
>p1 = [NSBezierPath bezierPath] ;
>[p1 moveToPoint: linebottom] ;
>[p1 lineToPoint: linetop] ; [p1 stroke] ;
__________________________________________________________________
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden