Skip to content

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

Open
jcgsxr wants to merge 4 commits into
ylechelle:masterfrom
jcgsxr:master
Open

There is a potential memory leak with guuid string creation. It needs to be released at some point.#26
jcgsxr wants to merge 4 commits into
ylechelle:masterfrom
jcgsxr:master

Conversation

@jcgsxr

@jcgsxr jcgsxr commented Apr 19, 2012

Copy link
Copy Markdown

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

@pal

pal commented May 28, 2012

Copy link
Copy Markdown

+1
Please merge this to main branch.

@blackcct

blackcct commented Jun 8, 2012

Copy link
Copy Markdown

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

orarbel commented Jun 19, 2012

Copy link
Copy Markdown

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
Copy Markdown

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