Commit b1f013e7 authored by Toralf Niebuhr's avatar Toralf Niebuhr Committed by Rémi Duraffort

use NSAutoreleasePool::drain instead of NSAutoreleasePool::release since...

use NSAutoreleasePool::drain instead of NSAutoreleasePool::release since VLCKit ist compiled with Objective-C Garbage Collection = Supported
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit b7508014)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 7cc5ef0d
......@@ -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
......
......@@ -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];
}
/******************************************************************************
......
......@@ -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];
}
......
......@@ -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
......
......@@ -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];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment