Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2019-11-29 17:10:02 +0000
committerJonah Graham2019-11-29 17:10:02 +0000
commit0d4fcccd3d9c2fdedb47202bd7b50f8a01fa7b3d (patch)
treed35d1516bd4789a32dbe0b9e6c9be024aa45f316
parent273c8ca95a5215f766523f05ca52d01984efabce (diff)
downloadorg.eclipse.cdt-0d4fcccd3d9c2fdedb47202bd7b50f8a01fa7b3d.tar.gz
org.eclipse.cdt-0d4fcccd3d9c2fdedb47202bd7b50f8a01fa7b3d.tar.xz
org.eclipse.cdt-0d4fcccd3d9c2fdedb47202bd7b50f8a01fa7b3d.zip
Bug 553613: Limit memory growth on generated typenames
When using the cache, only put the string reference in the typename if over the threshold. This is essentially a fixup for Bug 519121 Change-Id: I1436a9740bfb8ce46747f9a2ab0649ed366c4d9b
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java
index 0ea597d0485..60dab642d73 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java
@@ -649,8 +649,9 @@ public class ASTTypeUtil {
// requirement of appendStringReference().
if (cachedResult.length() > TYPE_STRING_LENGTH_THRESHOLD) {
appendStringReference(cachedResult, result);
+ } else {
+ result.append(cachedResult);
}
- result.append(cachedResult);
return;
}
}

Back to the top