I was wondering how that was different from Cocoa on Objective-C.
See: http://developer.apple.com/library/mac/#documentation/Cocoa/...
I was wondering how that was different from Cocoa on Objective-C.
See: http://developer.apple.com/library/mac/#documentation/Cocoa/...
Or would the mere act of using cocoa in one part of my application somehow prevent me from exploiting such an opportunity in another part of my application?
My instinct says that, for example, a plain C library that used such techniques would not cease to function just by being linked into a cocoa application.
What I meant, however, is that most nontrivial Cocoa apps are likely to end up with a checkerboard allocation pattern, where the client allocated, controlled-lifetime objects are interspersed with Cocoa library allocated autoreleased objects with somewhat longer lifetimes, which may interfere to some extent with any strategy relying on controlling your object lifetime.
Still, people can and do avoid autoreleasing objects if their lifetimes are well known in advance.