From 79280258c7c849cb595bf99dad6f7eba244c5dd5 Mon Sep 17 00:00:00 2001 From: Alcaro Date: Sun, 19 Apr 2015 18:58:27 +0200 Subject: [PATCH] (D3D) Do use new/delete --- gfx/d3d/d3d.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/d3d/d3d.cpp b/gfx/d3d/d3d.cpp index 60dea99791..24e515f7f4 100644 --- a/gfx/d3d/d3d.cpp +++ b/gfx/d3d/d3d.cpp @@ -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));