3 Answers
3

You should not release eventArraySave. It will be returned to you with a net retain count of 0 (after autorelease). If you're seeing leaks from this line, then that suggests that you are over-retaining it somewhere else, or possibly that you are over-retaining some object that is contained within eventArraySave (since this is where that object is allocated as well).

The leak tools do not tell you where your mistake is. They tell you where you allocated the memory that was later leaked.

I haven't tested it recently, but I think NSKeyedArchiver should return you the same class (mutable or immutable) that you archived. I believe you're thinking of NSPropertyListSerialization and the collection serialization operations (writeToFile:...).
–
Rob NapierNov 30 '11 at 20:25

@Rob: I just tested this on a Mac and you are right. Thanks for correcting me, I'll correct my post.
–
Ole BegemannNov 30 '11 at 20:33