[vlc-commits] commit: use NSAutoreleasePool::drain instead of NSAutoreleasePool:: release since VLCKit ist compiled with Objective-C Garbage Collection = Supported (Toralf Niebuhr )

git at videolan.org git at videolan.org
Thu Jul 22 17:17:42 CEST 2010


vlc | branch: master | Toralf Niebuhr <gmthor85 at aim.com> | Thu Jul 22 11:39:36 2010 +0200| [b7508014f4b124bd1a98f32fbe59ef803198e7b9] | committer: Jean-Baptiste Kempf 

use NSAutoreleasePool::drain instead of NSAutoreleasePool::release since VLCKit ist compiled with Objective-C Garbage Collection = Supported

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 .../macosx/framework/Sources/VLCEventManager.m     |    6 +++---
 projects/macosx/framework/Sources/VLCMedia.m       |    8 ++++----
 .../macosx/framework/Sources/VLCMediaDiscoverer.m  |    4 ++--
 projects/macosx/framework/Sources/VLCMediaList.m   |    4 ++--
 projects/macosx/framework/Sources/VLCMediaPlayer.m |    8 ++++----
 5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/projects/macosx/framework/Sources/VLCEventManager.m b/projects/macosx/framework/Sources/VLCEventManager.m
index 81013ca..b810b24 100644
--- a/projects/macosx/framework/Sources/VLCEventManager.m
+++ b/projects/macosx/framework/Sources/VLCEventManager.m
@@ -155,7 +155,7 @@ static void * EventDispatcherMainLoop(void * user_data)
                                    withObject:dataMessage
                                 waitUntilDone: YES];
 
-        [pool release];
+        [pool drain];
     }
     return nil;
 }
@@ -231,7 +231,7 @@ static void * EventDispatcherMainLoop(void * user_data)
         pthread_mutex_unlock( [self queueLock] );
     }
     
-    [pool release];
+    [pool drain];
 }
 
 - (void)callOnMainThreadObject:(id)aTarget withMethod:(SEL)aSelector withArgumentAsObject: (id)arg
@@ -250,7 +250,7 @@ static void * EventDispatcherMainLoop(void * user_data)
     pthread_cond_signal( [self signalData] );
     pthread_mutex_unlock( [self queueLock] );
     
-    [pool release];
+    [pool drain];
 }
 @end
 
diff --git a/projects/macosx/framework/Sources/VLCMedia.m b/projects/macosx/framework/Sources/VLCMedia.m
index 8d0d203..6295611 100644
--- a/projects/macosx/framework/Sources/VLCMedia.m
+++ b/projects/macosx/framework/Sources/VLCMedia.m
@@ -115,7 +115,7 @@ static void HandleMediaMetaChanged(const libvlc_event_t * event, void * self)
     [[VLCEventManager sharedManager] callOnMainThreadObject:self
                                                  withMethod:@selector(metaChanged:)
                                        withArgumentAsObject:[VLCMedia metaTypeToString:event->u.media_meta_changed.meta_type]];
-    [pool release];
+    [pool drain];
 }
 
 static void HandleMediaDurationChanged(const libvlc_event_t * event, void * self)
@@ -126,7 +126,7 @@ static void HandleMediaDurationChanged(const libvlc_event_t * event, void * self
                                                  withMethod:@selector(setLength:)
                                        withArgumentAsObject:[VLCTime timeWithNumber:
                                            [NSNumber numberWithLongLong:event->u.media_duration_changed.new_duration]]];
-    [pool release];
+    [pool drain];
 }
 
 static void HandleMediaStateChanged(const libvlc_event_t * event, void * self)
@@ -137,7 +137,7 @@ static void HandleMediaStateChanged(const libvlc_event_t * event, void * self)
                                                  withMethod:@selector(setStateAsNumber:)
                                        withArgumentAsObject:[NSNumber numberWithInt:
                                             LibVLCStateToMediaState(event->u.media_state_changed.new_state)]];
-    [pool release];
+    [pool drain];
 }
 
 static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
@@ -146,7 +146,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
     [[VLCEventManager sharedManager] callOnMainThreadObject:self
                                                  withMethod:@selector(subItemAdded)
                                        withArgumentAsObject:nil];
-    [pool release];
+    [pool drain];
 }
 
 /******************************************************************************
diff --git a/projects/macosx/framework/Sources/VLCMediaDiscoverer.m b/projects/macosx/framework/Sources/VLCMediaDiscoverer.m
index 02b9ce9..162435e 100644
--- a/projects/macosx/framework/Sources/VLCMediaDiscoverer.m
+++ b/projects/macosx/framework/Sources/VLCMediaDiscoverer.m
@@ -55,7 +55,7 @@ static void HandleMediaDiscovererStarted(const libvlc_event_t * event, void * us
     [[VLCEventManager sharedManager] callOnMainThreadObject:self
                                                  withMethod:@selector(mediaDiscovererStarted)
                                        withArgumentAsObject:nil];
-    [pool release];
+    [pool drain];
 }
 
 static void HandleMediaDiscovererEnded( const libvlc_event_t * event, void * user_data)
@@ -65,7 +65,7 @@ static void HandleMediaDiscovererEnded( const libvlc_event_t * event, void * use
     [[VLCEventManager sharedManager] callOnMainThreadObject:self
                                                  withMethod:@selector(mediaDiscovererEnded)
                                        withArgumentAsObject:nil];
-    [pool release];
+    [pool drain];
 }
 
 
diff --git a/projects/macosx/framework/Sources/VLCMediaList.m b/projects/macosx/framework/Sources/VLCMediaList.m
index c2f68e7..847ad44 100644
--- a/projects/macosx/framework/Sources/VLCMediaList.m
+++ b/projects/macosx/framework/Sources/VLCMediaList.m
@@ -58,7 +58,7 @@ static void HandleMediaListItemAdded(const libvlc_event_t * event, void * user_d
                                                           [VLCMedia mediaWithLibVLCMediaDescriptor:event->u.media_list_item_added.item], @"media",
                                                           [NSNumber numberWithInt:event->u.media_list_item_added.index], @"index",
                                                           nil]]];
-    [pool release];
+    [pool drain];
 }
 
 static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * user_data)
@@ -68,7 +68,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
     [[VLCEventManager sharedManager] callOnMainThreadObject:self
                                                  withMethod:@selector(mediaListItemRemoved:)
                                        withArgumentAsObject:[NSNumber numberWithInt:event->u.media_list_item_deleted.index]];
-    [pool release];
+    [pool drain];
 }
 
 @implementation VLCMediaList
diff --git a/projects/macosx/framework/Sources/VLCMediaPlayer.m b/projects/macosx/framework/Sources/VLCMediaPlayer.m
index 44bddac..a50333b 100644
--- a/projects/macosx/framework/Sources/VLCMediaPlayer.m
+++ b/projects/macosx/framework/Sources/VLCMediaPlayer.m
@@ -79,7 +79,7 @@ static void HandleMediaTimeChanged(const libvlc_event_t * event, void * self)
     [[VLCEventManager sharedManager] callOnMainThreadDelegateOfObject:self
                                                    withDelegateMethod:@selector(mediaPlayerTimeChanged:)
                                                  withNotificationName:VLCMediaPlayerTimeChanged];
-    [pool release];
+    [pool drain];
 }
 
 static void HandleMediaPositionChanged(const libvlc_event_t * event, void * self)
@@ -89,7 +89,7 @@ static void HandleMediaPositionChanged(const libvlc_event_t * event, void * self
     [[VLCEventManager sharedManager] callOnMainThreadObject:self
                                                  withMethod:@selector(mediaPlayerPositionChanged:)
                                        withArgumentAsObject:[NSNumber numberWithFloat:event->u.media_player_position_changed.new_position]];
-    [pool release];
+    [pool drain];
 }
 
 static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * self)
@@ -120,7 +120,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
                                                    withDelegateMethod:@selector(mediaPlayerStateChanged:)
                                                  withNotificationName:VLCMediaPlayerStateChanged];
 
-    [pool release];
+    [pool drain];
 
 }
 
@@ -132,7 +132,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
                                                  withMethod:@selector(mediaPlayerMediaChanged:)
                                        withArgumentAsObject:[VLCMedia mediaWithLibVLCMediaDescriptor:event->u.media_player_media_changed.new_media]];
 
-    [pool release];
+    [pool drain];
 
 }
 



More information about the vlc-commits mailing list