Hi,
I used "Analyse" on an ARC project, and see three warnings which are the
"Memory is never released, potential leak of memory pointed to by byteData".
What gives?
it's talking about this:
Given it's an ARC project, I thought I can't release it if I wanted to.
At this point in the program, I am finished with everything except for memoryfile.
I used "Analyse" on an ARC project, and see three warnings which are the
"Memory is never released, potential leak of memory pointed to by byteData".
What gives?
it's talking about this:
Code:
// Check if the file already exists
if ([filemgr fileExistsAtPath: dataFile])
{
// Read file contents and display in textBox
NSData *databufferx;
databufferx = [filemgr contentsAtPath: dataFile];
NSUInteger len = [databufferx length];
Byte *byteData = (Byte*)malloc(len);
memcpy(byteData, [databufferx bytes], len);
// copy file into second half of array
for (int ix = 0; ix < len; ix++) {
memoryfile[ix+1337481] = byteData[ix];
}
}
Given it's an ARC project, I thought I can't release it if I wanted to.
At this point in the program, I am finished with everything except for memoryfile.
Last edited: