From bfb3bde4aa0824b7aaea71a9a85158724c74e678 Mon Sep 17 00:00:00 2001 From: Tom Black Date: Thu, 21 Apr 2016 23:21:05 -0400 Subject: Use S2D_FreeWindow instead of S2D_Close MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simple 2D’s `S2D_Close` now just exits the window loop, doesn’t actually free anything --- ext/ruby2d/ruby2d.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/ruby2d/ruby2d.c b/ext/ruby2d/ruby2d.c index 1726d90..281f402 100644 --- a/ext/ruby2d/ruby2d.c +++ b/ext/ruby2d/ruby2d.c @@ -31,10 +31,10 @@ struct sound_data { /* - * Function pointer to close the Simple 2D window + * Function pointer to free the Simple 2D window */ -static void close_window() { - S2D_Close(window); +static void free_window() { + S2D_FreeWindow(window); } @@ -265,7 +265,7 @@ static VALUE ruby2d_show(VALUE s) { S2D_Show(window); - atexit(close_window); + atexit(free_window); return Qnil; } -- cgit v1.2.3