From 0a207c95dc3ac5e0db1267daeaaef44ed91812f1 Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Mon, 3 Nov 2014 23:24:33 +0000 Subject: [PATCH] gl/cocoa: use NSAutoreleasePool to free resize data Otherwise when resizing the window you will also get messages like: class NSConcreteMapTable autoreleased with no pool in place - just leaking class NSConcreteValue autoreleased with no pool in place - just leaking class NSConcreteValue autoreleased with no pool in place - just leaking class __NSCFDictionary autoreleased with no pool in place - just leaking --- gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m index cac72e6..0771662 100644 --- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m @@ -514,6 +514,7 @@ struct resize static void resize_cb (gpointer data) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; struct resize *resize_data = data; GstGLWindowCocoa *window_cocoa = resize_data->window; GstGLWindow *window = GST_GL_WINDOW (window_cocoa); @@ -540,6 +541,7 @@ resize_cb (gpointer data) [glContext flushBuffer]; } gst_object_unref (context); + [pool release]; } - (void)renewGState { -- 2.7.4