summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2022-07-01 14:02:28 -0400
committerGitHub <noreply@github.com>2022-07-01 11:02:28 -0700
commitb0ea5ed4da709312910898fa03b4dafc7a27e358 (patch)
tree70adea35a369d43bea79d71dcb2f8758772562aa /source/slang/slang.cpp
parent65cd44d54cc76d78777cde5f8a02b485056249f3 (diff)
Fix for issue with redirecting stdout/err to a file (#2311)
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 13ef0cd81..f2e6c5497 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -1440,8 +1440,14 @@ void TranslationUnitRequest::addSourceFile(SourceFile* sourceFile)
}
}
+EndToEndCompileRequest::~EndToEndCompileRequest()
+{
+ // Flush any writers associated with the request
+ m_writers->flushWriters();
-//
+ m_linkage.setNull();
+ m_frontEndReq.setNull();
+}
static ISlangWriter* _getDefaultWriter(WriterChannel chan)
{
@@ -1467,7 +1473,7 @@ void EndToEndCompileRequest::setWriter(WriterChannel chan, ISlangWriter* writer)
// If the user passed in null, we will use the default writer on that channel
m_writers->setWriter(SlangWriterChannel(chan), writer ? writer : _getDefaultWriter(chan));
- // For diagnostic output, if the user passes in nullptr, we set on mSink.writer as that enables buffering on DiagnosticSink
+ // For diagnostic output, if the user passes in nullptr, we set on m_sink.writer as that enables buffering on DiagnosticSink
if (chan == WriterChannel::Diagnostic)
{
m_sink.writer = writer;