macosx retain sharedContext and releaseContext