diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-12-07 15:43:52 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-12-13 15:01:05 +0100 |
commit | c4d4d6cfcacdbeb277ab6624dc33d0b490024f9b (patch) | |
tree | 48259cc5860cd57347deb6e28585f2e98c6332ed /platform/gl | |
parent | 26006b55f02c8d0a4a90ffedb45f724798052ef2 (diff) | |
download | mupdf-c4d4d6cfcacdbeb277ab6624dc33d0b490024f9b.tar.xz |
gl: Tell glut to return from main loop when the window closes.
This allows us to clean up memory so we can check for memory leaks.
Also fix one memory leak.
Diffstat (limited to 'platform/gl')
-rw-r--r-- | platform/gl/gl-main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c index 6475b501..620348c2 100644 --- a/platform/gl/gl-main.c +++ b/platform/gl/gl-main.c @@ -1661,6 +1661,8 @@ int main(int argc, char **argv) /* Init GLUT */ + glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS); + glutInitErrorFunc(on_error); glutInitWarningFunc(on_warning); glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE); @@ -1706,6 +1708,7 @@ int main(int argc, char **argv) fz_debug_store(ctx); #endif + fz_drop_stext_page(ctx, text); fz_drop_link(ctx, links); fz_drop_page(ctx, page); fz_drop_outline(ctx, outline); |