Re: string pointer


 



On Mar 9, 2018, at 6:24 AM, Dave <dave@...> wrote:

But the problem occurred when you assigned the object returned in that manner to a property or iVar and didn’t retain it. If you accessed  before had been released by AU, it worked ok, but if it was a while later (usually in response to a notification) it causes a crash.

That's [was] true of any value. Whether it's a method return value or an 'out' parameter makes no difference. If you didn't retain it, you didn't own it, and it might go away.

So this really has nothing to do with 'out' parameters, and it's not an issue nowadays because of ARC.

—Jens

Join cocoa@apple-dev.groups.io to automatically receive all group messages.