STTwitter icon indicating copy to clipboard operation
STTwitter copied to clipboard

Should I enable ARC compile option using STTwitter library?

Open maslovsa opened this issue 10 years ago • 2 comments

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));

maslovsa avatar Oct 01 '14 07:10 maslovsa

cfuuid memory is managed manually.

uuid memory is managed by ARC.

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

nst avatar Oct 08 '14 13:10 nst

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

ePirat avatar Apr 03 '17 06:04 ePirat