summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 5fdec8259..08c996fd2 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -2632,7 +2632,7 @@ SLANG_API SlangResult slang_createGlobalSession(
if(apiVersion != 0)
return SLANG_E_NOT_IMPLEMENTED;
- Slang::Session* globalSession = new Slang::Session();
+ Slang::RefPtr<Slang::Session> globalSession(new Slang::Session());
globalSession->init();
Slang::ComPtr<slang::IGlobalSession> result(Slang::asExternal(globalSession));
*outGlobalSession = result.detach();