changeset 9311:f0ea55d72c07

8036882: [macosx] Native memory leak in Java_sun_lwawt_macosx_CImage_nativeGetNSImageRepresentationSizes Reviewed-by: serb, pchelko
author alexsch
date Tue, 01 Apr 2014 13:23:16 +0400
parents 6501870b8997
children 68495e07208a
files src/macosx/native/sun/awt/CImage.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/native/sun/awt/CImage.m	Tue Apr 01 13:20:05 2014 +0400
+++ b/src/macosx/native/sun/awt/CImage.m	Tue Apr 01 13:23:16 2014 +0400
@@ -391,7 +391,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: