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.