summaryrefslogtreecommitdiffstats
path: root/tools/slang-reflection-test
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2018-12-14 15:24:21 -0500
committerGitHub <noreply@github.com>2018-12-14 15:24:21 -0500
commitd43c566fa29bbc0da1534aea236d54ee5ca104b8 (patch)
tree5a1878687364d28361a2c6aa722c5c8d9c75810e /tools/slang-reflection-test
parentec745c032a8dc16c3e689458c20541a4e7aa64d6 (diff)
Fix memory leaks around slang-test (#757)
* Remove circular reference to renderer on Vk & D3D12 DescriptorSetImpl * Refactor Stbi image loading such that memory is correctly freed when goes out of scope. Added Crt memory dump at termination. Reduced erroneous reporting by scoping TestContext. * Used capitalized acronym for STBImage to keep Tim happy. * Split out TestReporter - to just handle reporting test results Split out Options Made TestContext hold options, and the reporter Removed remaining memory leaks. * Small optimization for rawWrite, such that it directly writes over print.. * Improve comments on TestCategorySet * Fix typos in TestCategorySet
Diffstat (limited to 'tools/slang-reflection-test')
-rw-r--r--tools/slang-reflection-test/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/slang-reflection-test/main.cpp b/tools/slang-reflection-test/main.cpp
index 41a21eee8..ad474ee70 100644
--- a/tools/slang-reflection-test/main.cpp
+++ b/tools/slang-reflection-test/main.cpp
@@ -18,7 +18,8 @@ struct PrettyWriter
static void writeRaw(PrettyWriter& writer, char const* begin, char const* end)
{
- Slang::AppContext::getStdOut().print("%.*s", int(end - begin), begin);
+ SLANG_ASSERT(end >= begin);
+ Slang::AppContext::getStdOut().write(begin, size_t(end - begin));
}
static void writeRaw(PrettyWriter& writer, char const* begin)