mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-06 19:00:12 +00:00
Do not leak the NSMutableSet
This commit is contained in:
parent
b8fa675a6a
commit
b48c8318a1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user