iphone - Application gets crashed -
this question has answer here:
- exc_bad_access signal received 32 answers
i using below code auto share on facebook in iphone application, application crashed exc_bad_access
message, when tap share button.
nsmutabledictionary *variables = [nsmutabledictionary dictionarywithcapacity:4]; [variables setobject:@"yours content shared" forkey:@"message"]; // share prepared content fb fb_graph_response = [fbgraph dographpost:@"me/feed" withpostvars:variables]; nslog(@"postmefeedbuttonpressed: %@", fb_graph_response.htmlresponse);
help me out in advance.
it hard tell code provided, 1 idea:
dictionary variables
created autorelease object. means if not retained in fbgraph
, deallocated app returns main run loop, in tabbing share button handled. in case, variables
no longer exists after button pressed, , exc_bad_access error.
if using arc, handled correctly compiler.
Comments
Post a Comment