mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-14 01:41:10 +00:00
Don't leak memory if re-creating an existing array
This commit is contained in:
1 parent
7131d39a6d
commit
9b15527a84
1 file changed
+2
@@ -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