Do not leak the NSMutableSet

This commit is contained in:
Kristian Rietveld 2009-12-30 14:16:55 +01:00 committed by Tristan Van Berkom
parent b8fa675a6a
commit b48c8318a1

View File

@ -87,6 +87,7 @@ NSArray *
_gtk_quartz_target_list_to_pasteboard_types (GtkTargetList *target_list)
{
NSMutableSet *set = [[NSMutableSet alloc] init];
NSArray *ret;
GList *list;
for (list = target_list->list; list; list = list->next)
@ -97,7 +98,11 @@ _gtk_quartz_target_list_to_pasteboard_types (GtkTargetList *target_list)
g_free (target);
}
return [set allObjects];
ret = [set allObjects];
[set release];
return ret;
}
NSArray *
@ -105,6 +110,7 @@ _gtk_quartz_target_entries_to_pasteboard_types (const GtkTargetEntry *targets,
guint n_targets)
{
NSMutableSet *set = [[NSMutableSet alloc] init];
NSArray *ret;
int i;
for (i = 0; i < n_targets; i++)
@ -112,7 +118,11 @@ _gtk_quartz_target_entries_to_pasteboard_types (const GtkTargetEntry *targets,
[set addObject:target_to_pasteboard_type (targets[i].target)];
}
return [set allObjects];
ret = [set allObjects];
[set release];
return ret;
}
GdkAtom