mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-08 03:30:17 +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)
|
_gtk_quartz_target_list_to_pasteboard_types (GtkTargetList *target_list)
|
||||||
{
|
{
|
||||||
NSMutableSet *set = [[NSMutableSet alloc] init];
|
NSMutableSet *set = [[NSMutableSet alloc] init];
|
||||||
|
NSArray *ret;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
for (list = target_list->list; list; list = list->next)
|
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);
|
g_free (target);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [set allObjects];
|
ret = [set allObjects];
|
||||||
|
|
||||||
|
[set release];
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSArray *
|
NSArray *
|
||||||
@ -105,6 +110,7 @@ _gtk_quartz_target_entries_to_pasteboard_types (const GtkTargetEntry *targets,
|
|||||||
guint n_targets)
|
guint n_targets)
|
||||||
{
|
{
|
||||||
NSMutableSet *set = [[NSMutableSet alloc] init];
|
NSMutableSet *set = [[NSMutableSet alloc] init];
|
||||||
|
NSArray *ret;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < n_targets; 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)];
|
[set addObject:target_to_pasteboard_type (targets[i].target)];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [set allObjects];
|
ret = [set allObjects];
|
||||||
|
|
||||||
|
[set release];
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkAtom
|
GdkAtom
|
||||||
|
Loading…
Reference in New Issue
Block a user