From d20644a5cb582b360c61f84b9c7e6c4c8e0411fa Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Mon, 3 Nov 2014 23:24:33 +0000 Subject: 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 8989ea9d9..3f7cba715 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 { -- cgit v1.2.1