From fc8b5758ca7a9b3aaf2f93d45ff570fab2a68bb8 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 31 Jul 2020 12:25:58 -0400 Subject: Fix for bug where memory that has been allocated with new T[] (within a list) is freed with free in the RiffContainer. (#1473) --- source/core/slang-riff.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/core') diff --git a/source/core/slang-riff.h b/source/core/slang-riff.h index 6eeb0a722..9bdbcfdeb 100644 --- a/source/core/slang-riff.h +++ b/source/core/slang-riff.h @@ -363,9 +363,10 @@ public: /// Set the payload on a data. Payload can be passed as nullptr, if it is no memory will be copied. void setPayload(Data* data, const void* payload, size_t size); - /// Move ownership to + /// Move ownership to. + /// NOTE! The payload *must* be deallocatable via 'free' void moveOwned(Data* data, void* payload, size_t size); - /// Move unowned + /// Move unowned. The payload scope must last longer than the RiffContainer void setUnowned(Data* data, void* payload, size_t size); /// End a chunk -- cgit v1.2.3