summaryrefslogtreecommitdiffstats
path: root/source/slang/compiler.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2018-02-19 19:53:45 -0500
committerYong He <yonghe@outlook.com>2018-02-19 19:53:45 -0500
commit5de62bbe4dddc64895ddb17c4eb3572c3c9be248 (patch)
treed12fd2a9bad9a632430e1262de8f7e7da388bffa /source/slang/compiler.h
parentff8adf7b45121aada0b4f4403b0f45a6e2dfe475 (diff)
more to fixing memory leaks
1. reorder destruction order of several key classes to avoid using deleted IR objects when destroying Types 2. remove Session::canonicalTypes and make each Type own a RefPtr to the canonicalType, to allow types to be destroyed along with each IRModule it belongs to.
Diffstat (limited to 'source/slang/compiler.h')
-rw-r--r--source/slang/compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/compiler.h b/source/slang/compiler.h
index 7ead5d07e..b1cebc2a1 100644
--- a/source/slang/compiler.h
+++ b/source/slang/compiler.h
@@ -450,7 +450,6 @@ namespace Slang
Dictionary<int, RefPtr<Type>> builtinTypes;
Dictionary<String, Decl*> magicDecls;
- List<RefPtr<Type>> canonicalTypes;
void initializeTypes();
@@ -505,6 +504,7 @@ namespace Slang
RefPtr<Scope> const& scope,
String const& path,
String const& source);
+ ~Session();
};
}