Re: Questions regarding release
Re: Questions regarding release
- Subject: Re: Questions regarding release
- From: Quincey Morris via Cocoa-dev <email@hidden>
- Date: Wed, 25 Sep 2019 17:35:13 -0700
On Sep 25, 2019, at 13:52 , Rob Petrovec via Cocoa-dev
<email@hidden> wrote:
>
>> Is the IOObjectRelease() right or wrong ?
> I’m not entirely sure since I can’t find the docs for
> IOServicePortFromCGDisplayID.
Given that the code fragment shows it as a message being sent to “self”, this
looks like Gabriel’s own method. By the standard Obj-C clang naming
conventions, this should return a non-owning (+0) reference, so it should not
be released without being explicitly retained.
My guess is that it actually returns a +1 reference, but uses a non-standard
naming convention. In that case, the code is correct as written (although
unclear because it doesn’t follow the naming conventions).
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden