Re: Retaining NSInputStream working with NSStream
Re: Retaining NSInputStream working with NSStream
- Subject: Re: Retaining NSInputStream working with NSStream
- From: Fritz Anderson <email@hidden>
- Date: Thu, 27 May 2004 10:41:41 -0500
Strict application of the naming conventions suggest that the returned
NSStream pointers are autoreleased; the method that returns them
doesn't contain "new," "copy," or "alloc." The method could have been
named "newStreamsToHost:..." and wasn't.
So I'd retain them. I could be wrong, but I'd consider it at least a
documentation bug if I were.
-- F
On 27 May 2004, at 2:28 AM, Christoffer Lerno wrote:
NSStream has the method
+(void)getStreamsToHost:port:inputStream:outputStream
You throw in a NSInputStream** for an inputStream argument and similar
for the outputstream. Now my question is: What the heck is the status
for these streams? Did they got assigned autoreleased streams or did I
get something that is retained? I.e. should I do a [inputStream
retain] after this method or not??
--
Fritz Anderson
Consulting Programmer
http://resume.manoverboard.org/
_______________________________________________
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.