Hi I have seen a few examples of adding breakpoints in gdb using the command fb. I have tried using the following but it doesn’t work…
fb -[NSTimer release]
I tried it but it says.
Function "-[NSTimer release]" not defined.
As you can probably tell I want the debugger to stop when release is called on any NSTimer object.
How can I create the breakpoint I want on [NSTimer release]?
Thanks!
More likely than not,
NSTimerdoesn’t actually implement-release, opting to inherit said method from the superclass.Now, one solution would be to add something like this:
To your project somewhere. The you could set a breakpoint.
However, I wouldn’t bother. Instead, you can use the Allocations Instrument to see each and every retain/release event against a particular object, often far more useful than just the releases (especially considering that there may be dozens of NSTimer objects coming/going in an application).