0

Possible Duplicate:
How to get the reference count of an NSObject?

Is there any way to find out reference count for individual variable at any given instance. I tried with heap shots it gives overall reference counts in a flow.

Thanks

Community
  • 1
  • 1
pa12
  • 1,493
  • 4
  • 19
  • 40

1 Answers1

1

You can use the -retainCount method to get the retain count for an NSObject, but bear in mind that you will almost certainly not get back any useful information. Objects can be retained by various parts of the system and frameworks so you will often get back unexpected results.

Mike Weller
  • 45,401
  • 15
  • 131
  • 151
  • Apple has deprecated the method, because as you explained it will not supply any useful information. – rckoenes Sep 11 '12 at 14:52