mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 22:25:55 +00:00
Don't leak memory if re-creating an existing array
This commit is contained in:
@@ -36,6 +36,7 @@ namespace rdctype
|
||||
template<typename T>
|
||||
void create_array(array<T> &ret, size_t count)
|
||||
{
|
||||
ret.Delete();
|
||||
ret.count = (int32_t)count;
|
||||
if(ret.count == 0)
|
||||
{
|
||||
@@ -54,6 +55,7 @@ void create_array(array<T> &ret, size_t count)
|
||||
template<typename T>
|
||||
void create_array_uninit(array<T> &ret, size_t count)
|
||||
{
|
||||
ret.Delete();
|
||||
ret.count = (int32_t)count;
|
||||
if(ret.count == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user