From 94fa998b7e3524ce101a977ed3516fac13461287 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Mon, 1 Nov 2021 16:06:51 +0000 Subject: Add extra cleanup code to debug builds. Also fix some memory leaks. --- src/surface.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/surface.c') diff --git a/src/surface.c b/src/surface.c index 76abec9..81b2b58 100644 --- a/src/surface.c +++ b/src/surface.c @@ -19,6 +19,13 @@ void surface_initialise( gl_initialise(&surface->gl, texture); } +void surface_destroy(struct surface *surface) +{ + egl_make_current(&surface->egl); + gl_destroy(&surface->gl); + egl_destroy(&surface->egl); +} + void surface_draw( struct surface *surface, struct color *color, -- cgit v1.2.3