From 19d062cae68e42fdfc66436659fd170aa2410dc2 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 25 Feb 2013 14:21:14 +0400 Subject: [PATCH] get rid of JDOM duplicates in memory --- .../com/intellij/codeInspection/ex/InspectionProfileImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ex/InspectionProfileImpl.java b/platform/lang-impl/src/com/intellij/codeInspection/ex/InspectionProfileImpl.java index 103560466ea5..b60b58736eb3 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/InspectionProfileImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/InspectionProfileImpl.java @@ -261,7 +261,8 @@ public class InspectionProfileImpl extends ProfileEx implements ModifiableModel, StringInterner interner = new StringInterner(); for (final Object o : element.getChildren(INSPECTION_TOOL_TAG)) { - Element toolElement = (Element)o; + // make clone to avoid retaining memory via o.parent pointers + Element toolElement = (Element)((Element)o).clone(); JDOMUtil.internElement(toolElement, interner); String toolClassName = toolElement.getAttributeValue(CLASS_TAG);