On Sep 25, 2019, at 13:52 , Rob Petrovec via Cocoa-dev 
<cocoa-dev@lists.apple.com> 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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to