Benoît Lahoz Benoît Lahoz - 1 year ago 155
Objective-C Question

What is NSTaggedDate?

I have an error that I can't understand, that is happening while I want to release all objects in an NSMutableDictionary.

It's happening for a custom object called body and the output is :

-[__NSTaggedDate body]: unrecognized selector sent to instance 0xffffffffffffffff


I found very poor informations about it on the Internet.

Answer Source

That's a private class of Apple. Errors like this usually occur when you mess up your memory management.

Why are you trying to release all objects in a dictionary? When you add an object to a dictionary (or an array), the dictionary will retain it (take ownership). And when you remove the object from the dictionary it will be released, you don't have to do that.

Did you already consider using ARC? It makes memory management a lot easier. You don't have to worry about retaining and releasing objects anymore.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download