PDA

View Full Version : Instruments, test a memory leak




Tex-Twil
Dec 3, 2009, 10:36 AM
Hi,
I just started with mac/iPhone development and I wrote my 1st dummy hello word app for the iPhone. I was playing around with Instruments and I wanted to test if it will detect a memory leak. I added a button to my app which executes this when pressed:


void p* = malloc(1024000);
p=nil;


When I run the app in Instruments, I can see the memory usage jump up when I hit the button but shouldn't I see some warnings saying that the memory is actually leaking ?

Thanks for your help,
Tex