From 5de62bbe4dddc64895ddb17c4eb3572c3c9be248 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 19 Feb 2018 19:53:45 -0500 Subject: 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. --- source/slang/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/compiler.h') 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> builtinTypes; Dictionary magicDecls; - List> canonicalTypes; void initializeTypes(); @@ -505,6 +504,7 @@ namespace Slang RefPtr const& scope, String const& path, String const& source); + ~Session(); }; } -- cgit v1.2.3