Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2019-08-08 06:17:02 +0000
committerTill Brychcy2019-08-08 06:59:25 +0000
commit53f08313f43802adc93682794f30a3fdd5a11954 (patch)
tree6dc5294ef3b57eb6e5abd2667d15efad25e174ef
parent49c33f307da3b1090e83f21b8986d0ef3c1c9cb1 (diff)
downloadeclipse.platform.swt-53f08313f43802adc93682794f30a3fdd5a11954.tar.gz
eclipse.platform.swt-53f08313f43802adc93682794f30a3fdd5a11954.tar.xz
eclipse.platform.swt-53f08313f43802adc93682794f30a3fdd5a11954.zip
Bug 549779 - Eclipse uses much more memory than Xmx is configured
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/internal/graphics/ImageUtil.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
index 5eadda37e9..478d9da876 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
@@ -1502,6 +1502,7 @@ void initAlpha_200(NSBitmapImageRep nativeRep) {
if (alphaInfo_200 == null) alphaInfo_200 = new AlphaInfo();
alphaInfo_200.init(nativeRep, rep);
+ rep.release();
} finally {
if (pool != null) pool.release();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/internal/graphics/ImageUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/internal/graphics/ImageUtil.java
index 45caec6d99..34d8570a41 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/internal/graphics/ImageUtil.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/internal/graphics/ImageUtil.java
@@ -53,6 +53,7 @@ public class ImageUtil {
sourceRect.height = 0;
imgHandle.drawInRect(target, sourceRect, OS.NSCompositeCopy, 1);
NSGraphicsContext.static_restoreGraphicsState();
+ rep.autorelease();
return rep;
}
}

Back to the top