Tracking system object deallocs

Have you ever had a time when you had a memory leak, but was unsure if the problem were your objects, or that some collection item holding them wasn’t getting dealloced?

Well, now you don’t need to wonder any more:

This demo project highlights the Tracker class. After creating and initializing say a mutable array, ask Tracker to track it:

[Tracker trackerWithObject:obj msg:@”Some Msg”];

If obj does get dealloc’d, you’ll see a NSLog message in the console. Or, at some point where you think obj should have been dealloced, ask the class for the current list of tracked objects and dump their descriptions to the console.

You probably don’t need this functionality often, but when you need it, its invaluable!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s