GNOME Bugzilla – Bug 762999
Memory leak in qmlglsink
Last modified: 2016-04-14 17:43:16 UTC
Created attachment 322889 [details] [review] Fix memory leak There is a memory leak with opengl contexts. There is 2 context being created: this->priv->other_context = gst_gl_context_new_wrapped (this->priv->display, gl_handle, platform, gl_api); widget->priv->context = gst_gl_context_new (widget->priv->display); Sink acquires them via qt_item_get_qt_context/qt_item_get_context which do gst_object_ref before returning object. The attachment fixes the issue on my side. Context get properly deleted and associated thread quits. I am not sure though if my attachment would work in all cases - if window is hidden opengl context would be lost. But this case is already not handled by qmlglsink so I did not make any changes).
Pushed a slightly modified version commit 7981c1cb8608049ac7e78a6c3cb00b62dd7289e0 Author: Sergey Borovkov <sergey.borovkov@wireload.net> Date: Tue Mar 1 18:22:37 2016 +0300 qml: Fix leak of the OpenGL contexts [Matthew Waters]: add NULL checks before unreffing https://bugzilla.gnome.org/show_bug.cgi?id=762999