8036882: [macosx] Native memory leak in Java_sun_lwawt_macosx_CImage_nativeGetNSImageRepresentationSizes
Reviewed-by: serb, pchelko
--- a/jdk/src/macosx/native/sun/awt/CImage.m Fri Mar 28 14:53:19 2014 +0400
+++ b/jdk/src/macosx/native/sun/awt/CImage.m Fri Mar 28 17:31:16 2014 +0400
@@ -379,7 +379,7 @@
return getOrder(size1.width <= size2.width && size1.height <= size2.height);
}];
- NSMutableArray *sortedPixelSizes = [[NSMutableArray alloc] init];
+ NSMutableArray *sortedPixelSizes = [[[NSMutableArray alloc] init] autorelease];
NSSize lastSize = [[sortedImageRepresentations lastObject] size];
NSUInteger i = [sortedImageRepresentations indexOfObjectPassingTest: