[ Version ( since = "3.58" ) ]
public void set_user_data (void* user_data, BoxedCopyFunc? copy_user_data, BoxedFreeFunc? free_user_data)
Sets the user data members of the this in a safe way, meaning the function does not change the user data when it's the same as that already set; otherwise it frees the current user data, if the free function was previously provided, and the assigns the three members to the self.
The function assumes owner ship of the user_data, optionally calling the free_user_data if provided, when the
user_data instance is the same as the already set.
| this | |
| user_data |
custom user data, or null |
| copy_user_data |
a copy function for the |
| free_user_data |
a free function for the |