Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2012-02-01 17:50:12 +0000
committerSilenio Quarti2012-02-01 18:14:30 +0000
commit52de1f9158541d5fa279cd0ccd60c8a0ef968370 (patch)
treeaff9f8fabd96197fea271ac11cf20132637c8a76
parentb1f106a1e4fe095bbed48ca900f59f9acb684e88 (diff)
downloadeclipse.platform.swt-52de1f9158541d5fa279cd0ccd60c8a0ef968370.tar.gz
eclipse.platform.swt-52de1f9158541d5fa279cd0ccd60c8a0ef968370.tar.xz
eclipse.platform.swt-52de1f9158541d5fa279cd0ccd60c8a0ef968370.zip
Bug 338975 - [SWT OS X Cocoa] Eclipse causes WindowServer to consume memory
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
index a3aa7a3cf6..e5ca7942bd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
@@ -668,6 +668,7 @@ void createHandle () {
// TOOL shells always become key, so disable that behavior.
((NSPanel)window).setBecomesKeyOnlyIfNeeded(false);
}
+ window.setReleasedWhenClosed(true);
if ((style & SWT.NO_TRIM) == 0) {
NSSize size = window.minSize();
size.width = NSWindow.minFrameWidthWithTitle(NSString.string(), styleMask);
@@ -773,8 +774,8 @@ void destroyWidget () {
window.close();
} else if (view != null) {
view.removeFromSuperview();
- view.release();
}
+ if (view != null) view.release();
// If another shell is not going to become active, clear the menu bar.
// Don't modify the menu bar if we are an embedded Shell, though.

Back to the top