mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Fix leaking memory in byte[] marshalling case
This commit is contained in:
@@ -373,6 +373,10 @@ namespace renderdoc
|
||||
byte[] val = new byte[arr.count];
|
||||
if(val.Length > 0)
|
||||
Marshal.Copy(arr.elems, val, 0, val.Length);
|
||||
|
||||
if (freeMem)
|
||||
RENDERDOC_FreeArrayMem(arr.elems);
|
||||
|
||||
return val;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user