Re: Trying to intentionally create a memory leak

2008-03-07 Thread Sherm Pendley
On Fri, Mar 7, 2008 at 5:45 PM, Jake [EMAIL PROTECTED] wrote: I am trying to create a simple Cocoa app that has an intentional memory leak so that I can play with the development tools Instruments, MallocDebug and leaks to learn how to detect memory leaks. I have a Cocoa console application

Re: Trying to intentionally create a memory leak

2008-03-07 Thread Jens Alfke
On 7 Mar '08, at 2:45 PM, Jake wrote: I have a Cocoa console application that has code that I was sure would leak - [NSNumber alloc] with no corresponding release. But when I run those tools I detect no leak. If you're just calling literally [NSNumber alloc], you're probably just

Re: Trying to intentionally create a memory leak

2008-03-07 Thread Ken Ferry
On Fri, Mar 7, 2008 at 2:59 PM, Sherm Pendley [EMAIL PROTECTED] wrote: On Fri, Mar 7, 2008 at 5:45 PM, Jake [EMAIL PROTECTED] wrote: I am trying to create a simple Cocoa app that has an intentional memory leak so that I can play with the development tools Instruments, MallocDebug and

Re: Trying to intentionally create a memory leak

2008-03-07 Thread Bill Bumgarner
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