Skip to main content
The structs returned by the user info query functions contain memory allocated dynamically by the SDK (the props string and the stream_tracks array). You must release it with the matching free function; otherwise memory leaks.

rtc_get_users_info

Gets info for every user in the channel. Returns

rtc_free_users_info

Frees the user array returned by rtc_get_users_info, including each user’s props and stream_tracks as well as the array itself.
count must be the value returned by rtc_get_users_info. Passing a smaller value leaks memory; passing a larger one goes out of bounds.

rtc_get_user_info

Gets info for a single user. user is provided by the caller (a stack variable is fine), and the SDK fills in its fields. Returns

rtc_free_user_info

Frees the dynamic memory inside a single rtc_user_info_t (props and stream_tracks), but not the struct itself.
Even if user is a stack variable, as long as rtc_get_user_info returned RTC_OK, you must call rtc_free_user_info once.

For field descriptions, see Types · rtc_user_info_t.

rtc_get_local_user_info

Gets the local user’s info (uid, sid, etc.), since 0.0.9. You also need to call rtc_free_user_info when you’re done with it. Returns: RTC_OK / RTC_INVALID_PARAM (invalid handle or user) / RTC_NOT_CONNECTED (not yet joined).

rtc_get_channel_info

Gets channel info, since 0.0.9. For fields, see Types · rtc_channel_info_t. After it returns RTC_OK, you must call rtc_free_channel_info to free the props inside it. Returns: RTC_OK / RTC_INVALID_PARAM / RTC_NOT_CONNECTED (not yet joined).