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

EXC_BAD_ACCESS #30

Closed
dipyalov opened this issue Jul 29, 2016 · 2 comments
Closed

EXC_BAD_ACCESS #30

dipyalov opened this issue Jul 29, 2016 · 2 comments

Comments

@dipyalov
Copy link

+ (void)initialize { if (self == [FBUnitySDKDelegate class]) { g_instances = [NSMutableArray array]; } }
in FBUnitySdkDelegate.m should be written as
+ (void)initialize { if (self == [FBUnitySDKDelegate class]) { g_instances = [[NSMutableArray alloc] init]; } }

because call to array autoreleases g_instances and makes app crash on complete call

@Decavoid
Copy link

Make sure you are compiling with ARC enabled.
http://clang.llvm.org/docs/AutomaticReferenceCounting.html#objects

If an object is declared with retainable object owner type, but without an explicit ownership qualifier, its type is implicitly adjusted to have __strong qualification.

@dipyalov
Copy link
Author

Thank you! I've set -fobjc-arc on all .m/.mm files of the wrapper and it did help.

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

No branches or pull requests

2 participants