Instruments, test a memory leak

Discussion in 'iOS Programming' started by Tex-Twil, Dec 3, 2009.

  1. macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #1
    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:

    Code:
    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
     

Share This Page