Memory Leak

Discussion in 'iOS Programming' started by asheshsj, Jan 22, 2009.

  1. asheshsj macrumors newbie

    Joined:
    Oct 30, 2008
    #1
    My code below is causing memory leak. Can someone please have a look at it and give me a solution

    NSData *data = [[NSData alloc] initWithContentsOfURL:imgurl];
    [fileManager createDirectoryAtPath:imagePath attributes:nil];
    [data writeToFile:imageFilePath atomically:NO];
    [getProfile setObject:imageFilePath forKey:mad:"img"];
    [testArray1 addObject:getProfile];
    [data release];
    [getProfile release];
    }

    Thanks,
    A
     
  2. macfanboy macrumors 6502a

    Joined:
    Jun 5, 2007
    #2
    just fyi for next time, use the code format in the text options next time you want to paste code. it's much easier to read that way.
     

Share This Page