Index: pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
index 68cf701ff1467f387c9d2e877a8f1272abe7026a..418bd2d23728c6eecf5e6c962f299c5350a4f014 100644 |
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
@@ -1287,14 +1287,28 @@ class TypeGraphInferrerEngine |
} |
void clear() { |
+ void cleanup(TypeInformation info) => info.cleanup(); |
+ |
+ allocatedCalls.forEach(cleanup); |
allocatedCalls.clear(); |
+ |
defaultTypeOfParameter.clear(); |
- types.typeInformations.values.forEach((info) => info.clear()); |
+ |
+ types.typeInformations.values.forEach(cleanup); |
+ |
+ types.allocatedTypes.forEach(cleanup); |
types.allocatedTypes.clear(); |
+ |
types.concreteTypes.clear(); |
+ |
+ types.allocatedClosures.forEach(cleanup); |
types.allocatedClosures.clear(); |
+ |
analyzedElements.clear(); |
generativeConstructorsExposingThis.clear(); |
+ |
+ types.allocatedMaps.values.forEach(cleanup); |
+ types.allocatedLists.values.forEach(cleanup); |
} |
Iterable<Element> getCallersOf(Element element) { |