[vlc-commits] macosx: avoid zombie when updating extensions dialog

David Fuhrmann git at videolan.org
Wed Aug 12 13:25:35 CEST 2015


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Wed Aug 12 13:20:38 2015 +0200| [f54301b602e9b17ed1ddeba869a7cd972b1470b3] | committer: David Fuhrmann

macosx: avoid zombie when updating extensions dialog

CFBridgingRelease was used in the wrong place.
All view objects should only be retained by the window (and in this
situation by the grid view dicts as well), thus they is no need to
additionally retain them for the p_sys_intf pointer.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f54301b602e9b17ed1ddeba869a7cd972b1470b3
---

 modules/gui/macosx/ExtensionsDialogProvider.m |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/ExtensionsDialogProvider.m b/modules/gui/macosx/ExtensionsDialogProvider.m
index ba1abd1..518aa98 100644
--- a/modules/gui/macosx/ExtensionsDialogProvider.m
+++ b/modules/gui/macosx/ExtensionsDialogProvider.m
@@ -382,13 +382,13 @@ static int extensionDialogCallback(vlc_object_t *p_this, const char *psz_variabl
             continue; /* Some widgets may be NULL at this point */
 
         BOOL shouldDestroy = widget->b_kill;
-        NSView *control = CFBridgingRelease(widget->p_sys_intf);
+        NSView *control = (__bridge NSView *)widget->p_sys_intf;
         BOOL update = widget->b_update;
 
         if (!control && !shouldDestroy) {
             control = createControlFromWidget(widget, self);
             updateControlFromWidget(control, widget, self);
-            widget->p_sys_intf = (void *)CFBridgingRetain(control);
+            widget->p_sys_intf = (__bridge void *)control;
             update = YES; // Force update and repositionning
             [control setHidden:widget->b_hide];
         }



More information about the vlc-commits mailing list