Well, I thought I'd seen it that way, but I can't find it now, so I must have just remembered it incorrectly. At any rate, the best method has been pointed out to me, and I understand why it's the way it is...

Any thoughts on accessing a 2D array from an NSMutableData object?

J.

On 20-Mar-09, at 12:46 PM, mmalc Crawford wrote:


On Mar 20, 2009, at 11:33 AM, James Maxwell wrote:

- (void) setFloatData:(NSData *) theData
{
  if(m_floatData)
      [m_floatData release];
  m_floatData = [theData retain];
}
This is how I've seen it done in the Apple docs, but maybe this isn't the best way to do things...(??)

I would be extremely surprised if you have seen this in the documentation. If there is an example that shows this, please file a bug.

All similar examples I've seen follow the patterns illustrated here:
<http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAccessorMethods.html >

mmalc


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to