• 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: null values in NSArray ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: null values in NSArray ???


  • Subject: Re: null values in NSArray ???
  • From: Brian Webster <email@hidden>
  • Date: Fri, 17 Jan 2003 11:29:38 -0600

On Friday, January 17, 2003, at 09:56 AM, email@hidden wrote:

Can anyone tell me if it is possible to manage an NSMutableArray that
contains null values for objects at any given index ?

I don't want to incur
the overhead of the NSNull object allocation(s) in a large grid.

I haven't tested this, but I always assumed that calling [NSNull null] will return you a single instance of NSNull instead of creating a new instance of NSNull, since there's really no reason to have more than one around. If this isn't the case, you could always just create your own shared NSNull instance and use that. So you'd have an array with placeholders all pointing to a single instance of the object rather than having hundreds of different instances allocated.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • OT: Re: null values in NSArray ???
      • From: Daniel Hedrick <email@hidden>
  • Prev by Date: Re: NSSlider: differentiating mouseDown, mouseUp, mouseDragged
  • Next by Date: Re: [slightly OT] Cocoa development books in electronic form
  • Previous by thread: Re: null values in NSArray ???
  • Next by thread: OT: Re: null values in NSArray ???
  • Index(es):
    • Date
    • Thread