Revert "fix memory leak (#10633)" (#10649)

This reverts commit 8fd97d58e2.
This commit is contained in:
minggo
2022-04-02 18:12:30 +08:00
committed by GitHub
parent f7fb834b6e
commit a864cff3e8
+1 -3
View File
@@ -142,17 +142,15 @@ private:
Device *device = CC_NEW(DeviceCtor);
if (DETACH_DEVICE_THREAD) {
CC_DELETE(device);
device = CC_NEW(gfx::DeviceAgent(device));
}
if (CC_DEBUG > 0 && !FORCE_DISABLE_VALIDATION || FORCE_ENABLE_VALIDATION) {
CC_DELETE(device);
device = CC_NEW(gfx::DeviceValidator(device));
}
if (!device->initialize(info)) {
CC_DELETE(device);
CC_SAFE_DELETE(device);
return false;
}