ultimately, it depends on the interfaces you use in the implementation.
example 1
if you interact with Foundation or other types of objc, you should. no questions.
to answer the specific example that you posted: definitely create one in this case - the NSString apis should assume that the autocomplete pool is in place.
example 2
if you are fully using apis in libc there is no need.
bottom row
it may take a long time to figure out where it is needed (or not).
the implementation may change, and they may introduce objects with auto-implementation.
you must ensure that the leak is never introduced, especially for such a simple reason.
This is a simple problem to overcome: if in doubt, create one.
justin
source share