[vlc-devel] [PATCH] Do not need retain the instance after created

Shenggang Hu mrhhsg at gmail.com
Mon Jun 15 16:43:57 CEST 2015


Cause libvlc_new will create a instance with reference count 1
---
 Sources/VLCLibrary.m | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Sources/VLCLibrary.m b/Sources/VLCLibrary.m
index 4d70519..ca1aea7 100644
--- a/Sources/VLCLibrary.m
+++ b/Sources/VLCLibrary.m
@@ -88,8 +88,6 @@ static VLCLibrary * sharedLibrary = nil;
         paramNum++;
     }
     _instance = libvlc_new(count, lib_vlc_params);
-    if (_instance)
-        libvlc_retain(_instance);
 
     NSAssert(_instance, @"libvlc failed to initialize");
 }
-- 
2.3.2 (Apple Git-55)




More information about the vlc-devel mailing list