summaryrefslogtreecommitdiffhomepage
path: root/ext
diff options
context:
space:
mode:
authorTom Black <[email protected]>2015-10-07 00:33:57 -0400
committerTom Black <[email protected]>2015-10-07 00:33:57 -0400
commit96451ab4c3ec65097e2fd47de07e3a297823e88e (patch)
tree3530785f9d77a630b28713db5f0c636859e1bed6 /ext
parentbbbe83a3a2a9071ea48d0e25a4638fee5cb3ea30 (diff)
downloadruby2d-96451ab4c3ec65097e2fd47de07e3a297823e88e.tar.gz
ruby2d-96451ab4c3ec65097e2fd47de07e3a297823e88e.zip
Free image and text structs
Diffstat (limited to 'ext')
-rw-r--r--ext/ruby2d/ruby2d.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/ruby2d/ruby2d.c b/ext/ruby2d/ruby2d.c
index 625215a..bd2d5da 100644
--- a/ext/ruby2d/ruby2d.c
+++ b/ext/ruby2d/ruby2d.c
@@ -32,6 +32,7 @@ static void close_window() {
static void free_image(struct image_data *data) {
S2D_FreeImage(data->img);
+ xfree(data);
}
static VALUE init_image(char *path) {
@@ -44,6 +45,7 @@ static VALUE init_image(char *path) {
static void free_text(struct text_data *data) {
S2D_FreeText(data->txt);
+ xfree(data);
}
static VALUE init_text(char *font, char *msg, int size) {