/* This function creates a new radio button group, allocating required memory and properly initializing the object. If there is not enough memory, the function returns NULL. The radio button group will keep a reference count for its members, and will be automatically destroyed when the last member is destroyed. */
struct wtk_radio_group* wtk_radio_group_create(void)
/* This function creates a new radio button group, allocating required memory and properly initializing the object. If there is not enough memory, the function returns NULL. The radio button group will keep a reference count for its members, and will be automatically destroyed when the last member is destroyed. */
struct wtk_radio_group* wtk_radio_group_create(void)
{
	struct wtk_radio_group *radio_group
		= membag_alloc(sizeof(struct wtk_radio_group));
	if (!radio_group) {
		goto outofmem_radio_group;
	}
	radio_group->num_references = 0;
	radio_group->selected = NULL;
	return radio_group;
outofmem_radio_group:
	return NULL;
}