xcode - Objective C Pointer to pointer in method memory error -


i want return 2 objects method set method return nsdictionary , nsindexpath reference, shouldn't hard reason exc_bad_access error after method finished , returned.

- (nsmutabledictionary *)sortedmessagesunreadindexpath:(nsindexpath **)indexpathforunreadmessage {     ...     if (indexpathforunreadmessage != null)         *indexpathforunreadmessage = [nsindexpath indexpathforrow:array.count-1 insection:dict.count-1];     ...     return dict; }  // call  nsindexpath *unreadindexpath = null; self.messages = [self.conversation sortedmessagesunreadindexpath:&unreadindexpath];  // exc_bad_access error here after method return  self.unreadindexpath = unreadindexpath; 

edit
using arc, ios 7 sdk, xcode 5


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -