From d43c566fa29bbc0da1534aea236d54ee5ca104b8 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 14 Dec 2018 15:24:21 -0500 Subject: 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 --- source/core/slang-writer.h | 2 +- source/slang/slang.vcxproj.filters | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/core/slang-writer.h b/source/core/slang-writer.h index 4c30ddb96..0e67684ec 100644 --- a/source/core/slang-writer.h +++ b/source/core/slang-writer.h @@ -14,7 +14,7 @@ class WriterHelper public: SlangResult print(const char* format, ...); SlangResult put(const char* text); - + SLANG_FORCE_INLINE SlangResult write(const char* chars, size_t numChars) { return m_writer->write(chars, numChars); } SLANG_FORCE_INLINE void flush() { m_writer->flush(); } ISlangWriter* getWriter() const { return m_writer; } diff --git a/source/slang/slang.vcxproj.filters b/source/slang/slang.vcxproj.filters index d72909bc1..edd51db88 100644 --- a/source/slang/slang.vcxproj.filters +++ b/source/slang/slang.vcxproj.filters @@ -1,4 +1,4 @@ - + -- cgit v1.2.3