<AWT Dev> [9] Review Request: 8047061 [macosx] Crash when setting display mode
    Alexander Scherbatiy 
    alexandr.scherbatiy at oracle.com
       
    Wed Jun 18 09:02:29 UTC 2014
    
    
  
   The fix looks good to me.
   Thanks,
   Alexandr.
On 6/17/2014 4:43 PM, Petr Pchelko wrote:
> Hello, AWT Team.
>
> Please review the fix for the issue:
> https://bugs.openjdk.java.net/browse/JDK-8047061
> The fix is available at:
> http://cr.openjdk.java.net/~pchelko/9/8047061/webrev/
>
> When we are searching through valid display modes we are storing them in an array. Before the fix we were passing NULL
> CFArrayCallbacks structure making an array of weak references.  (the CFArrayCallbacks is a structure of the function pointers
> which are called to retain and release elements of the array) So we were relying on the fact that Carbon also retains the pointers
> we are using internally. But sometimes it's not the case. The solution is simple - pass default array callbacks structure to create
> an array of strong references which can be passed around.
>
> I've checked that no native memory leak is introduced with this change.
>
> With best regards. Petr.
    
    
More information about the awt-dev
mailing list