Skip to content
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

There is a potential memory leak with guuid string creation. It needs to be released at some point. #26

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jcgsxr
Copy link

@jcgsxr jcgsxr commented Apr 19, 2012

I placed the release at the end of the method instead of using autorelease since you can't autorelease Core Foundation objects.

@pal
Copy link

pal commented May 28, 2012

+1
Please merge this to main branch.

@blackcct
Copy link

blackcct commented Jun 8, 2012

i find the leak that run jcgsxr's code in iPhone4 ios 4.3.4
but then i use iPhone4s ios 5.1.1 it's nothing to happen
https://dl.dropbox.com/u/67903815/UIPasteboard_Leak.png

@orarbel
Copy link

orarbel commented Jun 19, 2012

you added a release at the end of the method but incase guuid was fetched from defaults ([defaults objectForKey:kAppGUUID]), it must not be released.
my suggestion is to retain if fetched from defaults: NSString * guuid = RETAIN((NSString *) [defaults objectForKey:kAppGUUID]);

then it will always have to be released

@ianmurrays
Copy link

Was this ever fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants