Make sure to delete buffers after use

This commit is contained in:
baldurk
2015-10-16 10:27:53 +02:00
parent 7a63e824cc
commit 347cd67354
+4
View File
@@ -311,6 +311,8 @@ bool WrappedVulkan::Serialise_InitialState(WrappedVkRes *res)
i++;
}
SAFE_DELETE_ARRAY(bindings);
GetResourceManager()->SetInitialContents(id, VulkanResourceManager::InitialContentData(NULL, validBinds, blob));
}
else if(type == eResDeviceMemory)
@@ -364,6 +366,8 @@ bool WrappedVulkan::Serialise_InitialState(WrappedVkRes *res)
ObjDisp(d)->UnmapMemory(Unwrap(d), Unwrap(mem));
SAFE_DELETE_ARRAY(data);
// VKTODOMED leaking the memory here! needs to be cleaned up with the buffer
GetResourceManager()->SetInitialContents(id, VulkanResourceManager::InitialContentData(GetWrapped(buf), eInitialContents_Copy, NULL));
}