mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
[ruamoko] Own created property list objects
If the PLItem classes create a property list object, they own it. Plugs more leaks.
This commit is contained in:
parent
e57427142b
commit
8b8bc42038
1 changed files with 9 additions and 3 deletions
|
@ -51,12 +51,16 @@
|
|||
|
||||
+ (PLItem *) fromString:(string) str
|
||||
{
|
||||
return [[PLItem itemClass: PL_GetPropertyList (str)] autorelease];
|
||||
PLItem *item = [[PLItem itemClass: PL_GetPropertyList (str)] autorelease];
|
||||
item.own = 1;
|
||||
return item;
|
||||
}
|
||||
|
||||
+ (PLItem *) fromFile:(QFile) file
|
||||
{
|
||||
return [[PLItem itemClass: PL_GetFromFile (file)] autorelease];
|
||||
PLItem *item = [[PLItem itemClass: PL_GetFromFile (file)] autorelease];
|
||||
item.own = 1;
|
||||
return item;
|
||||
}
|
||||
|
||||
- initWithItem:(plitem_t *) item
|
||||
|
@ -211,7 +215,9 @@
|
|||
|
||||
- (PLItem *) allKeys
|
||||
{
|
||||
return [[PLItem itemClass: PL_D_AllKeys (item)] autorelease];
|
||||
PLItem *item = [[PLItem itemClass: PL_D_AllKeys (item)] autorelease];
|
||||
item.own = 1;
|
||||
return item;
|
||||
}
|
||||
|
||||
- addKey:(string) key value:(PLItem *) value
|
||||
|
|
Loading…
Reference in a new issue