(D3D) Do use new/delete

This commit is contained in:
Alcaro 2015-04-19 18:58:27 +02:00
parent 1739259dde
commit 79280258c7

View File

@ -759,7 +759,7 @@ static void *d3d_init(const video_info_t *info,
}
#endif
vid = (d3d_video_t*)calloc(1, sizeof(*vid));
vid = new d3d_video_t();
if (!vid)
goto error;
@ -800,7 +800,7 @@ static void *d3d_init(const video_info_t *info,
error:
if (vid)
free(vid);
delete vid;
if (driver)
driver->video_context = NULL;
return NULL;
@ -839,7 +839,7 @@ static void d3d_free(void *data)
#endif
if (d3d)
free(d3d);
delete d3d;
#ifndef _XBOX
UnregisterClass("RetroArch", GetModuleHandle(NULL));