On Mar 7, 2008, at 6:12 PM, Ken Ferry wrote:
Also, it happens that numbers -1 through 12 (I think) are uniqued, so
[[NSNumber alloc] initWithInteger:5] won't leak either.

This isn't something to count on, of course.

In general, if you want to leak something on purpose, leak NSObjects or subclasses. The mutable collection classes are are relatively non- surprising to leak, too.

If you want some real fun, set up a couple of timers that call various methods at non-integral intervals (so you get beating effects) that do different, non-synchronizing, things to your state. Then add threads.

Then try and figure out how to use the debugging tools to figure out what went wrong.

malloc_history is a huge help.

Also, you'll probably want to turn on MallocScribble to wipe out any bits of diagnostic help done by the runtime so as to better simulate real world debugging in production systems.

b.bum

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to