mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-06-30 05:29:36 +00:00
Added dispose to cleanup resource leaks.
This commit is contained in:
parent
c9a15b0261
commit
83e6f89276
|
@ -215,6 +215,9 @@ public class FileViewerWindow {
|
||||||
black.dispose();
|
black.dispose();
|
||||||
blue.dispose();
|
blue.dispose();
|
||||||
green.dispose();
|
green.dispose();
|
||||||
|
if (nativeFilterAdapter != null) nativeFilterAdapter.dispose();
|
||||||
|
hexFilterAdapter.dispose();
|
||||||
|
rawDumpFilterAdapter.dispose();
|
||||||
System.gc();
|
System.gc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,11 @@ public class ApplesoftFilterAdapter extends FilterAdapter {
|
||||||
|
|
||||||
setContentTypeAdapter(new StyledTextAdapter(styledText, getFileEntry().getFilename()));
|
setContentTypeAdapter(new StyledTextAdapter(styledText, getFileEntry().getFilename()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void dispose() {
|
||||||
|
styledText.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void createStyledText() {
|
protected void createStyledText() {
|
||||||
styledText = new StyledText(getComposite(), SWT.NONE);
|
styledText = new StyledText(getComposite(), SWT.NONE);
|
||||||
|
|
|
@ -62,6 +62,9 @@ public abstract class FilterAdapter {
|
||||||
|
|
||||||
public abstract void display();
|
public abstract void display();
|
||||||
|
|
||||||
|
public void dispose() {
|
||||||
|
}
|
||||||
|
|
||||||
public ToolItem create(ToolBar toolBar) {
|
public ToolItem create(ToolBar toolBar) {
|
||||||
if (toolItem == null) {
|
if (toolItem == null) {
|
||||||
toolItem = new ToolItem(toolBar, SWT.RADIO);
|
toolItem = new ToolItem(toolBar, SWT.RADIO);
|
||||||
|
|
|
@ -84,5 +84,10 @@ public class GraphicsFilterAdapter extends FilterAdapter {
|
||||||
setContentTypeAdapter(new NoActionContentTypeAdapter());
|
setContentTypeAdapter(new NoActionContentTypeAdapter());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void dispose() {
|
||||||
|
image.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user