[OpenJDK 2D-Dev] [9] RFR: JDK-8151110, , libfontmanager should free memory with delete[] if it was allocated with new[]

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Mar 16 20:15:56 UTC 2016


Looks fine.

On 16.03.16 21:46, Philip Race wrote:
> +1
>
> -phil.
>
> On 3/15/16, 11:33 PM, prasanta sadhukhan wrote:
>> Hi Phil,
>>
>> Please review a small fix for
>> bug: https://bugs.openjdk.java.net/browse/JDK-8151110
>> webrev: http://cr.openjdk.java.net/~psadhukhan/8151110/webrev.00/
>>
>> where the issue was found that the allocation of memory was done
>> through new operator but free was done through free().
>> Since they operate on different heaps and can pose problem if the code
>> was to be run on new machine/compiler it's better to allocate through
>> calloc for free() to delete memory correctly.
>> noreg-cleanup is added for this bug.
>>
>> Regards
>> Prasanta


-- 
Best regards, Sergey.



More information about the 2d-dev mailing list