I am not sure about this:
// assume value is a NSDecimal type and exists
NSDecimalNumber *decNum = [[NSDecimalNumber alloc] initWithDecimal:value];
[encoder encodeObject:decNum forKey:@"someKey"];
[decNum release];
I'm wrapping the NSDecimal into an NSDecimalNumber object. I have to release it somewhere. But I am not sure... does the encoder retain that object, or will my -release to the object be a problem in some situations? I believe that the encoder actually just takes a "snapshot" of the naked data of that object and remembers it, but again, not sure. Maybe someone can help clear things up. Searched the docs for "release" and "retain", but they dont mention it in context.