summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@gmail.com>2014-11-03 23:24:33 +0000
committerSebastian Dröge <sebastian@centricular.com>2014-11-04 09:53:56 +0100
commitd20644a5cb582b360c61f84b9c7e6c4c8e0411fa (patch)
tree34340857ac3363db12cd353c28e0aa4e59c8b13c
parent85f67667b2e5d6de6b1b3d59cd08c44c12a30955 (diff)
downloadgstreamer-plugins-bad-d20644a5cb582b360c61f84b9c7e6c4c8e0411fa.tar.gz
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
-rw-r--r--gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m2
1 files changed, 2 insertions, 0 deletions
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 {