discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best way to have a byte array + NSZone questions


From: Aurelien
Subject: Best way to have a byte array + NSZone questions
Date: Thu, 6 Sep 2001 12:13:38 +0200

I have to access a raw byte array from within an object (it's a @protected instance variable). What's the best way to do that ? With NSData ?

When examining how to do it, I wondered what was the use of the NSXallocWithZone* methods, and what an NSZone object was. It's not documented in Apple's Foundation doc. Also when you NSXAlloc, you have to specify an NSZone pointer, but how do you get one ?

Also, generally speaking, I'd like to know if I'm not totally mistaken saying that simply, you have to send a retain message to an object when you don't want that object to be released when the object that created the given object is itself released. It means that the + <objectName> methods (those that statically return instances of a given class), return objects that could potentially be instantly released. Do you have to send a retain message to those objects right after getting them then ? What is the object that actually "owns" such statically created objects ?

Thanks for your help,

Aurélien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]