FROM : John C. Randolph
DATE : Mon Dec 20 22:26:36 2004
On Dec 20, 2004, at 11:04 AM, Julian Pellico wrote:
>
>> My advice is always that you shouldn't try to track retain count like
>> that. What if it's autoreleased?
> It would hardly be safe for the frameworks to autorelease it.
It's not only safe, it's perfectly appropriate for the framework code
to autorelease a view to balance the -retain that the view got when
added to its superview.
> I might
> want that NSView well past the end of the run loop.
Whenever you want something to stick around, it's up to you to retain
it.
-jcr
John C. Randolph <<email_removed>> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
DATE : Mon Dec 20 22:26:36 2004
On Dec 20, 2004, at 11:04 AM, Julian Pellico wrote:
>
>> My advice is always that you shouldn't try to track retain count like
>> that. What if it's autoreleased?
> It would hardly be safe for the frameworks to autorelease it.
It's not only safe, it's perfectly appropriate for the framework code
to autorelease a view to balance the -retain that the view got when
added to its superview.
> I might
> want that NSView well past the end of the run loop.
Whenever you want something to stick around, it's up to you to retain
it.
-jcr
John C. Randolph <<email_removed>> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
| Related mails | Author | Date |
|---|---|---|
| Julian Pellico | Dec 19, 08:29 | |
| j o a r | Dec 19, 09:51 | |
| Julian Pellico | Dec 20, 20:04 | |
| John C. Randolph | Dec 20, 20:50 | |
| mmalcolm crawford | Dec 20, 21:15 | |
| John C. Randolph | Dec 20, 22:26 |






Cocoa mail archive

