From 657213f13d49f0d2caaa8b64c1245ec8c75fc4d7 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 24 Jul 2024 11:44:13 -0700 Subject: Cleanup global memory allocations on shutdown. (#4731) Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> --- source/compiler-core/slang-spirv-core-grammar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/compiler-core') diff --git a/source/compiler-core/slang-spirv-core-grammar.h b/source/compiler-core/slang-spirv-core-grammar.h index 7fe8f6cd7..958aaaef2 100644 --- a/source/compiler-core/slang-spirv-core-grammar.h +++ b/source/compiler-core/slang-spirv-core-grammar.h @@ -16,7 +16,8 @@ namespace Slang struct SPIRVCoreGrammarInfo : public RefObject { static RefPtr loadFromJSON(SourceView& source, DiagnosticSink& sink); - static RefPtr getEmbeddedVersion(); + static RefPtr& getEmbeddedVersion(); + static inline void freeEmbeddedGrammerInfo() { getEmbeddedVersion() = nullptr; } template struct Lookup -- cgit v1.2.3