1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

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
This commit is contained in:
Jonah Graham 2019-11-29 12:10:02 -05:00
parent 273c8ca95a
commit 0d4fcccd3d

View file

@ -649,8 +649,9 @@ public class ASTTypeUtil {
// requirement of appendStringReference(). // requirement of appendStringReference().
if (cachedResult.length() > TYPE_STRING_LENGTH_THRESHOLD) { if (cachedResult.length() > TYPE_STRING_LENGTH_THRESHOLD) {
appendStringReference(cachedResult, result); appendStringReference(cachedResult, result);
} } else {
result.append(cachedResult); result.append(cachedResult);
}
return; return;
} }
} }