scream78 / oauth

Automatically exported from code.google.com/p/oauth
0 stars 0 forks source link

Memory leak in [OAMutableURLRequest _signatureBaseString] #128

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We have an app that incorporates the Obj-C 2.0 lib for Twitter OAuth.

When we run the app through instruments we discover a memory leak tracing
back to this method. We can't figure out why because everything seems to be
autoreleased.

The issue appears to be with the following:

[self URLEncodedString: normalizedRequestParameters]

which is part of:

    // OAuth Spec, Section 9.1.2 "Concatenate Request Elements"
    NSString *ret = [NSString stringWithFormat:@"%@&%@&%@",
                     [self HTTPMethod],
                     [self URLEncodedString: [self URLStringWithoutQueryFromURL: [self URL]]],
                     [self URLEncodedString: normalizedRequestParameters]];

I can't work out what to do to fix this - we've already cleared one memory
issue by releasing signature at the bottom of -(void)prepare in the same
file, but this one has stumped us.

When we get to the bottom of it, we'll post a patch, but any help is
appreciated along the way. We're completely stuck!

Thanks,

John

Original issue reported on code.google.com by Hend...@googlemail.com on 2 Oct 2009 at 6:11

GoogleCodeExporter commented 9 years ago

Original comment by morten.f...@gmail.com on 5 Jan 2010 at 11:34