[OGo-Developer] stuffing an NSArray into a NSMutableDictionary
Sebastian Reitenbach
developer@opengroupware.org
Mon, 16 Apr 2007 12:32:05 +0200
Hi,
> > any hint is very appreciated.
>
> Can't read the code. I suppose you need to start up in the debugger
> (or insert NSLogs) and see whats happening?
well, I'll see no other option, I thought someone with more experience see
it easily what i am doing wrong here and could give me a hint.
>
> Stuff like that is a memory leak:
>
> [[tmpdict objectForKey:[event objectForKey:@"Queue"]] takeValue:
> [[NSMutableArray alloc] init] forKey:@"Agents"]
>
> The array will never get released.
I assumed that too, this was just one of my thousand tries, without luck.
>
> If you know that you are working on a property list
> (NSMutableDictionary), you might want to use -setObject:forKey:
> instead of -takeValue:forKey:, though it should do the same thing (if
> it *is* a dictionary).
I know it is a dictionary, I just created it before, so I'll try, maybe that
works.
kind regards
Sebastian