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

macosx: fixed a few memory leaks

parent 8af2eab6
......@@ -508,6 +508,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
- (void)setRateControlsEnabled:(BOOL)b_enabled
{
NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
[o_mi_rate_sld setEnabled: b_enabled];
[o_mi_rate_sld setIntValue: [[VLCCoreInteraction sharedInstance] playbackRate]];
int i = [[VLCCoreInteraction sharedInstance] playbackRate];
......@@ -523,6 +524,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[o_mi_rate_lbl setHidden: YES];
[o_mi_rate_lbl_gray setHidden: NO];
}
[o_pool release];
}
#pragma mark -
......
......@@ -459,6 +459,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
p_input = pl_CurrentInput( VLCIntf );
if( p_input )
{
NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
vlc_value_t time;
NSString * o_time;
vlc_value_t pos;
......@@ -482,6 +483,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_time_fld setStringValue: o_time];
[o_time_fld setNeedsDisplay:YES];
// [[[[VLCMain sharedInstance] controls] fspanel] setStreamPos: f_updated andTime: o_time];
[o_pool release];
}
else
{
......@@ -511,8 +513,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)updateName
{
NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
input_thread_t * p_input;
p_input = pl_CurrentInput( VLCIntf );
if( p_input )
{
......@@ -564,6 +566,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setTitle: _NS("VLC media player")];
[self setRepresentedFilename: @""];
}
[o_pool release];
}
- (void)updateWindow
......@@ -639,6 +642,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)drawFancyGradientEffectForTimeSlider
{
NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
float f_value = ([o_time_sld_middle_view frame].size.width -5) * ([o_time_sld intValue] / [o_time_sld maxValue]);
if (f_value > 5.0)
{
......@@ -654,6 +658,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
[o_time_sld_fancygradient_view setHidden: YES];
}
[o_pool release];
}
#pragma mark -
......@@ -681,19 +686,27 @@ static VLCMainWindow *_o_sharedInstance = nil;
@end
@implementation VLCProgressBarGradientEffect
- (void)dealloc
{
[o_time_sld_gradient_left_img release];
[o_time_sld_gradient_middle_img release];
[o_time_sld_gradient_right_img release];
[super dealloc];
}
- (void)loadImagesInDarkStyle: (BOOL)b_value
{
if (b_value)
{
o_time_sld_gradient_left_img = [NSImage imageNamed:@"progressbar-fill-left_dark"];
o_time_sld_gradient_middle_img = [NSImage imageNamed:@"progressbar-fill-middle_dark"];
o_time_sld_gradient_right_img = [NSImage imageNamed:@"progressbar-fill-right_dark"];
o_time_sld_gradient_left_img = [[NSImage imageNamed:@"progressbar-fill-left_dark"] retain];
o_time_sld_gradient_middle_img = [[NSImage imageNamed:@"progressbar-fill-middle_dark"] retain];
o_time_sld_gradient_right_img = [[NSImage imageNamed:@"progressbar-fill-right_dark"] retain];
}
else
{
o_time_sld_gradient_left_img = [NSImage imageNamed:@"progression-fill-left"];
o_time_sld_gradient_middle_img = [NSImage imageNamed:@"progression-fill-middle"];
o_time_sld_gradient_right_img = [NSImage imageNamed:@"progression-fill-right"];
o_time_sld_gradient_left_img = [[NSImage imageNamed:@"progression-fill-left"] retain];
o_time_sld_gradient_middle_img = [[NSImage imageNamed:@"progression-fill-middle"] retain];
o_time_sld_gradient_right_img = [[NSImage imageNamed:@"progression-fill-right"] retain];
}
}
......
......@@ -174,6 +174,7 @@ static VLCInfo *_o_sharedInstance = nil;
- (void)updatePanelWithItem:(input_item_t *)_p_item;
{
NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
if( _p_item != p_item )
{
if( p_item ) vlc_gc_decref( p_item );
......@@ -260,6 +261,7 @@ static VLCInfo *_o_sharedInstance = nil;
/* update the stats once to display p_item change faster */
[self updateStatistics];
[o_pool release];
}
- (void)setMeta: (char *)psz_meta forLabel: (id)theItem
......
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