Title: Release NSPipe Cocoa
Tags: cocoa;macos;pipe
Question: Is it necessary to release a NSPipe created writing
NSPipe *pipe = [NSPipe pipe];
Actually I do not call alloc so theoretically I should not call release...Am I right?

Here is the accepted answer: Yes, you’re right. As usual, the memory management rules apply: if you’ve obtained an object via a method that isn’t NARC (name contains new, alloc, copy, or is retain), then you don’t own that object, hence you don’t release it.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2011:00:04/11/11', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<cocoa><macos><pipe>', 'Title': 'Release NSPipe Cocoa', 'ViewCount': 166, 'id': 5619471, 'user_AboutMe': '', 'user_AccountId': 210147.0, 'user_DisplayName': 'alfred', 'user_Reputation': 217.0, 'user_Views': 32.0, 'user_id': 461596.0}}