> On 29 Aug 2016, at 03:26, Andy Lee wrote:
>
> On Aug 24, 2016, at 4:25 PM, Jens Alfke wrote:
>>
>>> On Aug 24, 2016, at 1:04 PM, Andreas Falkenhahn
>>> wrote:
>>>
>>> Now, will "setFormatter" call retain on "formatter" or not?
On Aug 24, 2016, at 4:25 PM, Jens Alfke wrote:
>
>> On Aug 24, 2016, at 1:04 PM, Andreas Falkenhahn
>> wrote:
>>
>> Now, will "setFormatter" call retain on "formatter" or not? Looking
>> at "retainCount" seems to suggest so, although I know that
> On 25 Aug 2016, at 6:24 AM, Andreas Falkenhahn 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
Also, if you're unsure whether you're following ref-counting rules correctly,
the static analyzer in Xcode will give very detailed warnings about incorrect
uses. Just another way to determine if you're using ref-counting correctly.
Doug Hill
> On Aug 24, 2016, at 2:49 PM, Doug Hill
Wim,
If I may paraphrase:
The reference counting semantics are only interesting to the caller when the
callee returns an object. What the callee does with a setter is entirely the
responsibility of the callee to make sure it follows ref-counting rules. For
example, a setter may not involve a
On Aug 24, 2016, at 13:37 , Andreas Falkenhahn wrote:
>
> Thanks, this would make "setFormatter" a case of strong reference because
> it isn't documented otherwise...
To expand on what Jens said, slightly…
You’d need to check the docs for the version of the SDK you’re
On Aug 24, 2016, at 1:04 PM, Andreas Falkenhahn wrote:
> I have read Apple's memory management guide on retain/release and
> I think I've basically got it, but there's just one thing that
> I'm not confident about and that is "setXXX" methods which accept an
> NSObject
> On 24 Aug 2016, at 1:24 pm, Andreas Falkenhahn 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
On 24.08.2016 at 22:25 Jens Alfke wrote:
> On Aug 24, 2016, at 1:04 PM, Andreas Falkenhahn
> wrote:
> Now, will "setFormatter" call retain on "formatter" or not? Looking
> at "retainCount" seems to suggest so, although I know that this
> isn't reliable and shouldn't
> On Aug 24, 2016, at 1:04 PM, Andreas Falkenhahn
> wrote:
>
> Now, will "setFormatter" call retain on "formatter" or not? Looking
> at "retainCount" seems to suggest so, although I know that this
> isn't reliable and shouldn't be done at all...
These days, with ARC,
On 24.08.2016 at 22:14 Ben Kennedy wrote:
>> On 24 Aug 2016, at 1:04 pm, Andreas Falkenhahn
>> wrote:
>> I have read Apple's memory management guide on retain/release and
>> I think I've basically got it, but there's just one thing that
>> I'm not confident about and
> On 24 Aug 2016, at 1:04 pm, Andreas Falkenhahn wrote:
>
> I have read Apple's memory management guide on retain/release and
> I think I've basically got it, but there's just one thing that
> I'm not confident about and that is "setXXX" methods which accept an
>
I have read Apple's memory management guide on retain/release and
I think I've basically got it, but there's just one thing that
I'm not confident about and that is "setXXX" methods which accept an
NSObject parameter and I don't know how I can know whether the
"setXXX" retains or not.
For
13 matches
Mail list logo