Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavid_williams2005-07-16 16:44:06 +0000
committerdavid_williams2005-07-16 16:44:06 +0000
commitb2de2deb085ac1de2219f2082bfc1ef0f94f2207 (patch)
treee1cabff8286573ffb02883eb316f4b7c55de5f1a /bundles/org.eclipse.wst.dtd.core
parenta903b217d08ced09b3466999d4f6aa883dfd9fb8 (diff)
downloadwebtools.sourceediting-b2de2deb085ac1de2219f2082bfc1ef0f94f2207.tar.gz
webtools.sourceediting-b2de2deb085ac1de2219f2082bfc1ef0f94f2207.tar.xz
webtools.sourceediting-b2de2deb085ac1de2219f2082bfc1ef0f94f2207.zip
[103896] Memory leak in BasicStructuredDocument
Diffstat (limited to 'bundles/org.eclipse.wst.dtd.core')
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java
index 5778e8247c..e33ca24009 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java
@@ -263,10 +263,11 @@ public final class DTDModelImpl extends AbstractStructuredModel implements IStru
if (oldStructuredDocument != null)
oldStructuredDocument.removeDocumentChangingListener(this);
super.setStructuredDocument(newStructuredDocument);
- if (newStructuredDocument.getLength() > 0) {
- newModel(new NewDocumentEvent(newStructuredDocument, this));
- }
- if (newStructuredDocument != null)
+ if (newStructuredDocument != null) {
+ if (newStructuredDocument.getLength() > 0) {
+ newModel(new NewDocumentEvent(newStructuredDocument, this));
+ }
newStructuredDocument.addDocumentChangingListener(this);
+ }
}
}

Back to the top