1

I used the heapshot analysis, and it pointed to the first two lines reproduced below. It seems like I am releasing all the memory I am allocating. I don't see how the memory is accumulating.

        NSData* data = [NSKeyedUnarchiver unarchiveObjectWithFile:archivePath];
        UIImage *view = [[UIImage alloc] initWithData:data];        

        background = [[UIImageView alloc] initWithImage:view];
        [view release];
        [display addSubview: background];
        if(fileExists){
            [background addSubview: newView];
        }
        [background release];
4

0 回答 0