Commit 2fb0517e authored by Jean-Paul Saman's avatar Jean-Paul Saman

macosx: release allocated objects.

parent ec5d8611
......@@ -91,7 +91,7 @@
@implementation NSAnimation (VLCAdditions)
/* fake class attributes */
static NSMapTable *VLCAdditions_userInfo = NULL;
static NSMapTable *VLCAdditions_userInfo = nil;
+ (void)load
{
......@@ -124,7 +124,7 @@ static NSMapTable *VLCAdditions_userInfo = NULL;
@implementation NSScreen (VLCAdditions)
static NSMutableArray *blackoutWindows = NULL;
static NSMutableArray *blackoutWindows = nil;
+ (void)load
{
......@@ -132,6 +132,12 @@ static NSMutableArray *blackoutWindows = NULL;
blackoutWindows = [[NSMutableArray alloc] initWithCapacity:1];
}
- (void)dealloc
{
[blackoutWindows release];
[super dealloc];
}
+ (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID
{
int i;
......
......@@ -661,7 +661,11 @@ static inline void save_string_list( intf_thread_t * p_intf, id object, const ch
p_item = config_FindConfig( VLC_OBJECT(p_intf), name );
p_stringobject = (NSString *)[[object selectedItem] representedObject];
assert([p_stringobject isKindOfClass:[NSString class]]);
if( p_stringobject ) config_PutPsz( p_intf, name, [p_stringobject UTF8String] );
if( p_stringobject )
{
config_PutPsz( p_intf, name, [p_stringobject UTF8String] );
[p_stringobject release];
}
}
static inline void save_module_list( intf_thread_t * p_intf, id object, const char * name )
......@@ -694,7 +698,6 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
{
char *psz_tmp;
int i;
NSString *p_stringobject;
#define SaveIntList( object, name ) save_int_list( p_intf, object, name )
......
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