static void _linphone_friend_destroy(LinphoneFriend *lf){ _linphone_friend_release_ops(lf); if (lf->presence != NULL) linphone_presence_model_unref(lf->presence); if (lf->uri!=NULL) linphone_address_unref(lf->uri); if (lf->info!=NULL) buddy_info_free(lf->info); if (lf->vcard != NULL) linphone_vcard_free(lf->vcard); }
/*drops all references to the core and unref*/ void _linphone_friend_release(LinphoneFriend *lf){ lf->lc = NULL; _linphone_friend_release_ops(lf); linphone_friend_unref(lf); }