Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2005-07-13 21:25:24 +0000
committerMikhail Khodjaiants2005-07-13 21:25:24 +0000
commitf2bd352b06cf4a092b9ae6849308490cd9ef7a70 (patch)
tree11cafe9df3cb0a6e7e164c4af76a1b1a56f7df57
parentc990898c9705e271c8ada0e9ac20ed4ac82d83f2 (diff)
downloadorg.eclipse.cdt-f2bd352b06cf4a092b9ae6849308490cd9ef7a70.tar.gz
org.eclipse.cdt-f2bd352b06cf4a092b9ae6849308490cd9ef7a70.tar.xz
org.eclipse.cdt-f2bd352b06cf4a092b9ae6849308490cd9ef7a70.zip
Fixed the Memory view leaks.
-rw-r--r--debug/org.eclipse.cdt.debug.ui/ChangeLog7
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java1
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryText.java7
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryView.java1
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryViewer.java6
5 files changed, 20 insertions, 2 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog
index aeb86936d2d..2b1c4769cfb 100644
--- a/debug/org.eclipse.cdt.debug.ui/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog
@@ -1,3 +1,10 @@
+2005-07-13 Mikhail Khodjaiants
+ Fixed the Memory view leaks.
+ * MemoryControlArea.java
+ * MemoryText.java
+ * MemoryView.java
+ * MemoryViewer.java
+
2005-02-24 Mikhail Khodjaiants
Applied patch from Tracy Miranda (bug 86533: Breakpoint is set on the wrong line in Disassembly view).
* DisassemblyEditorInput.java
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java
index 9fca0b7c826..d69cae0ebcc 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java
@@ -357,6 +357,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget
if ( getPresentation() != null ) {
getPresentation().dispose();
}
+ fMemoryText.dispose();
super.dispose();
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryText.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryText.java
index c9e6916098b..8490899f4e0 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryText.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryText.java
@@ -53,6 +53,7 @@ public class MemoryText
MemoryPresentation presentation )
{
fText = new StyledText( parent, style );
+ fText.setFont( new Font( fText.getDisplay(), getFontData() ) );
fText.setLayoutData( new GridData( GridData.FILL_BOTH ) );
fPresentation = presentation;
initialize();
@@ -104,7 +105,6 @@ public class MemoryText
{
int offset = fText.getCaretOffset();
fText.getCaret().setVisible( false );
- fText.setFont( new Font( fText.getDisplay(), getFontData() ) );
fText.setBackground( getBackgroundColor() );
fText.setForeground( getForegroundColor() );
fText.setText( fPresentation.getText() );
@@ -233,7 +233,10 @@ public class MemoryText
}
*/
}
-
+
+ public void dispose() {
+ }
+
protected void setEditable( boolean editable )
{
fText.setEditable( editable );
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryView.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryView.java
index 0878dfc68a5..e278cba95cf 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryView.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryView.java
@@ -252,6 +252,7 @@ public class MemoryView extends AbstractDebugEventHandlerView implements ISelect
remove( (AutoRefreshMemoryAction)getAction( "AutoRefreshMemory" ) ); //$NON-NLS-1$
getSite().getPage().removeSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
CDebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener( this );
+ ((MemoryViewer)getViewer()).dispose();
super.dispose();
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryViewer.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryViewer.java
index c916a3f3876..95f0f475134 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryViewer.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryViewer.java
@@ -253,4 +253,10 @@ public class MemoryViewer extends ContentViewer {
protected ITextOperationTarget getTextOperationTarget() {
return (MemoryControlArea)fTabFolder.getSelection().getControl();
}
+
+ public void dispose() {
+ for ( int i = 0; i < fMemoryControlAreas.length; ++i ) {
+ fMemoryControlAreas[i].dispose();
+ }
+ }
} \ No newline at end of file

Back to the top