> On 25 Aug 2016, at 6:24 AM, Andreas Falkenhahn <[email protected]> wrote:
> 
> If it retains, I could just do the following:
> 
>    [textField setFormatter:formatter];
>    [formatter release];
> 
> And I wouldn't have to worry about "formatter" any longer. If it doesn't 
> retain,
> the above isn't possible. 


You should do this anyway - you only need to concern yourself with YOUR memory 
management, not other objects’. Are you done with it? Then release it. Whether 
the other object retained it or not is not your business or concern. If we had 
to know what other objects did with every parameter passed to them programming 
would be impossible.

Or use ARC and let the compiler figure it out.

—Graham



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to