mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-06 14:32:31 +00:00
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:
parent
ef707ee9d5
commit
f1365f1051
1 changed files with 2 additions and 0 deletions
|
@ -514,6 +514,7 @@ struct resize
|
||||||
static void
|
static void
|
||||||
resize_cb (gpointer data)
|
resize_cb (gpointer data)
|
||||||
{
|
{
|
||||||
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
struct resize *resize_data = data;
|
struct resize *resize_data = data;
|
||||||
GstGLWindowCocoa *window_cocoa = resize_data->window;
|
GstGLWindowCocoa *window_cocoa = resize_data->window;
|
||||||
GstGLWindow *window = GST_GL_WINDOW (window_cocoa);
|
GstGLWindow *window = GST_GL_WINDOW (window_cocoa);
|
||||||
|
@ -540,6 +541,7 @@ resize_cb (gpointer data)
|
||||||
[glContext flushBuffer];
|
[glContext flushBuffer];
|
||||||
}
|
}
|
||||||
gst_object_unref (context);
|
gst_object_unref (context);
|
||||||
|
[pool release];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)renewGState {
|
- (void)renewGState {
|
||||||
|
|
Loading…
Reference in a new issue