Fix memory leak and NSError generally code.

Memory leaking on MRC. (e.g. actionSheet, exportBtn)