Commit 98410808 authored by Felix Paul Kühne's avatar Felix Paul Kühne

fixed 3 potential memory leaks

parent c9622b6e
......@@ -159,6 +159,7 @@ static void * EventDispatcherMainLoop(void * user_data)
[self performSelectorOnMainThread:@selector(callObjectMethodWithArgs:)
withObject:dataMessage
waitUntilDone: YES];
[dataMessage autorelease];
[pool drain];
}
......@@ -230,6 +231,7 @@ static void * EventDispatcherMainLoop(void * user_data)
NSData *nsd_message = [NSData dataWithBytes:&message length:sizeof(message_t)];
[self addMessageToHandleOnMainThread:nsd_message];
[self callDelegateOfObjectAndSendNotificationWithArgs:[nsd_message retain] /* released in the call */];
[nsd_message autorelease];
}
else
{
......
......@@ -139,7 +139,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
- (void)removeMediaAtIndex:(NSInteger)index
{
[[self mediaAtIndex:index] release];
[cachedMedia removeObjectAtIndex:index];
// Remove it from the libvlc's medialist
libvlc_media_list_remove_index(p_mlist, index);
......
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