• 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: Allocating memory in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allocating memory in Cocoa


  • Subject: Re: Allocating memory in Cocoa
  • From: Sherm Pendley <email@hidden>
  • Date: Sun, 26 Dec 2004 11:42:43 -0500

On Dec 25, 2004, at 12:54 PM, Peter Karlsson wrote:

What is the right way of allocating memory in Cocoa?

If you're writing your own +alloc, other folks have mentioned the low-level functions you'll want to use.


But if you're looking for a Cocoa object instead of a function, you could create an NSMutableData object:

NSMutableData *myData = [NSMutableData dataWithCapacity:65536]; // autoreleased

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Allocating memory in Cocoa (From: "Peter Karlsson" <email@hidden>)

  • Prev by Date: Re: how to insert a NSAttributedString into a NSTextview ?
  • Next by Date: Re: how to insert a NSAttributedString into a NSTextview ?
  • Previous by thread: Re: Allocating memory in Cocoa
  • Next by thread: how to insert a NSAttributedString into a NSTextview ?
  • Index(es):
    • Date
    • Thread