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
This commit is contained in:
Julien Isorce 2014-11-03 23:24:33 +00:00 committed by Tim-Philipp Müller
parent ef707ee9d5
commit f1365f1051

View file

@ -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 {