• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSView out of memory problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView out of memory problem


  • Subject: Re: NSView out of memory problem
  • From: Andre Schnoor <email@hidden>
  • Date: Tue, 1 Apr 2008 17:27:55 +0200



p1 = [NSBezierPath bezierPath] ;
[p1 moveToPoint: linebottom] ;
[p1 lineToPoint: linetop] ; [p1 stroke] ;



You could keep a permanent bezier path at a convenient location (e.g. your view) and empty it instead of releasing it. This worked fine for my app:

[localPath removeAllPoints];
[localPath moveToPoint: linebottom];
[localPath lineToPoint: linetop];
[localPath stroke];


This is btw. even slightly faster than allocating a new one.

Andre

_______________________________________________

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


References: 
 >Re: NSView out of memory problem (From: Gorazd Krosl <email@hidden>)

  • Prev by Date: Alternating Button
  • Next by Date: Using UNCs with NSURLConnection
  • Previous by thread: Re: NSView out of memory problem
  • Next by thread: Re: NSView out of memory problem
  • Index(es):
    • Date
    • Thread