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

Should I enable ARC compile option using STTwitter library? #123

Open
maslovsa opened this issue Oct 1, 2014 · 2 comments
Open

Should I enable ARC compile option using STTwitter library? #123

maslovsa opened this issue Oct 1, 2014 · 2 comments
Labels

Comments

@maslovsa
Copy link

maslovsa commented Oct 1, 2014

My project is nonARC.
After integration STTwitter I have crash reports on users only with ios8 + iphone6 (on ios8(and lower) + iphon5s(and lower) its OK).

crashlytics 2014-10-01 11-04-32

I have Warning on STTwitter/STTwitterOAuth.m
Warning:(658, 23) '__bridge_transfer' casts have no effect when not using ARC

And I enable ARC for this file using -fobjc-arc - is it correct?

I read that "__bridge_transfer moves a non-Objective-C pointer to Objective-C and also transfers ownership to ARC".

May be replace
NSString *uuid = (__bridge_transfer NSString *)(CFUUIDCreateString (kCFAllocatorDefault, cfuuid));
with
NSString *uuid = (__bridge NSString *)(CFUUIDCreateString (kCFAllocatorDefault, cfuuid));

@nst
Copy link
Owner

nst commented Oct 8, 2014

cfuuid memory is managed manually.

uuid memory is managed by ARC.

So I don't get which pointer gets released twice here.

@nst nst added the bug label Oct 8, 2014
@ePirat
Copy link

ePirat commented Apr 3, 2017

This code seems fine, __bridge_transfer is the correct thing to use here, as far as I know.

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

No branches or pull requests

3 participants