-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Incorrect Memory Leak Detection #52
Comments
Hi, |
Oh right, thanks. |
@dulmarod: I still see this as a uint8_t *buffer = malloc(length);
...
NSData *data = [NSData dataWithBytesNoCopy:buffer length:length freeWhenDone:YES];
if (!data) {
free(buffer);
}
return data; |
There isn't a way to silence individual bugs at the moment. |
The following Objective-C code incorrectly results in a
error: MEMORY_LEAK memory dynamically allocated to buffer by call to malloc() at line X, column X is not reachable after line X, column X
.The buffer is passed to the returned NSData object and will be deallocated when the NSData instance will be.
The text was updated successfully, but these errors were encountered: