From a76f3fd6a807d07e14851263123a4f7166110769 Mon Sep 17 00:00:00 2001 From: Mario Visic Date: Wed, 23 Dec 2015 07:53:16 +0800 Subject: [PATCH] Use xfree over delete to be kinder to the ruby VM This is an attempt to help/solve some segfaults and memory issues we've been having. --- ext/exiv2/exiv2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/exiv2/exiv2.cpp b/ext/exiv2/exiv2.cpp index ac74818..228678e 100644 --- a/ext/exiv2/exiv2.cpp +++ b/ext/exiv2/exiv2.cpp @@ -106,7 +106,7 @@ extern "C" void Init_exiv2() { // Exiv2::Image Methods static void image_free(Exiv2::Image* image) { - delete image; + xfree(image); } static VALUE image_read_metadata(VALUE self) {