Thanks, Matthias. Changes look good to me.

I think it is hard to provide a regression test for this change, then please add noreg-hard label to the issue.

Naoto

On 7/23/19 4:23 AM, Baesken, Matthias wrote:
Hello,  please review  the following fix  that adds  CFRelease to 2  
CFLocaleCopyCurrent usages .

Bug/webrev :

https://bugs.openjdk.java.net/browse/JDK-8228501

http://cr.openjdk.java.net/~mbaesken/webrevs/8228501.0/

Best regards, Matthias



Thanks for your input !

I opened

https://bugs.openjdk.java.net/browse/JDK-8228501

for this issue, will provide a patch .

Best regards, Matthias


Date: Mon, 22 Jul 2019 12:56:50 -0700
From: naoto.s...@oracle.com
To: core-libs-dev@openjdk.java.net
Subject: Re: java_props_macosx.c : CFLocaleCopyCurrent() needs
        CFRelease ?
Message-ID: <72d41e80-82d2-44fc-dead-3fa6a653d...@oracle.com>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi Matthias,

Thanks for catching them. Yes, I believe they should be released
appropriately.

Naoto

On 7/22/19 4:01 AM, Baesken, Matthias wrote:
Hello  , maybe  someone  with more  OSX dev knowledge could comment
on this .
If I understand it correctly ,   the  OSX  Core Foundation Ownership Policy :



https://developer.apple.com/library/archive/documentation/CoreFoundatio

n/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc
/uid/20001148-103029

says that   "Object-duplication functions that have "Copy" embedded in
the
name."    (like  CFLocaleCopyCurrent )     need  to
relinquish ownership (using

CFRelease<https://developer.apple.com/documentation/corefoundation/1
521153-cfrelease>) when you have finished with it.

Should we better add then  CFRelease  to the  2   CFLocaleCopyCurrent
usages  in  src/java.base/macosx/native/libjava/java_props_macosx.c
(coding below) ?
Or do I miss something ?


Reply via email to