• 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: Matt Gough <email@hidden>
  • Date: Tue, 1 Apr 2008 14:50:39 +0200


On 1 Apr 2008, at 14:40, Leslie Smith wrote:
I'm sure I'm missing something.

Yes. An understanding of Autorelease pools (and presumably Cocoa memory management in general)


http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html

The unoptimal way to fix your memory usage would be:

NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
p1 = [NSBezierPath bezierPath] ;
[p1 moveToPoint: linebottom]  ;
[p1 lineToPoint: linetop] ;
[p1 stroke] ;
[pool release];

Matt
_______________________________________________

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


  • Follow-Ups:
    • Re: NSView out of memory problem
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >NSView out of memory problem (From: Leslie Smith <email@hidden>)

  • Prev by Date: Re: Getting Localized System Strings
  • Next by Date: Re: Getting Localized System Strings
  • Previous by thread: NSView out of memory problem
  • Next by thread: Re: NSView out of memory problem
  • Index(es):
    • Date
    • Thread