diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-07-31 12:25:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-31 09:25:58 -0700 |
| commit | fc8b5758ca7a9b3aaf2f93d45ff570fab2a68bb8 (patch) | |
| tree | 44f0b6b5b395c6a24ffd88407e4d6fb003276638 /source/core | |
| parent | 659d8ea5d8aad57f5e6fdbc48f94cc4b10b1c4d5 (diff) | |
Fix for bug where memory that has been allocated with new T[] (within a list) is freed with free in the RiffContainer. (#1473)
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-riff.h | 5 |
1 files changed, 3 insertions, 2 deletions
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 |
