Beispiel #1
0
void cmmjl_free(void *x){
	// An instance has been deleted, so we need to go through and free all 
	// of the data we allocated for it.

	t_cmmjl_obj *o = cmmjl_obj_get(x);
	int i;
	if(o->osc_address_methods){
		linklist_clear(o->osc_address_methods);
		free(o->osc_address_methods);
	}
	cmmjl_obj_instance_mark_free(x, o->instance);
	if(o->osc_scheduler){
		cmmjl_osc_schedule_free(o->osc_scheduler);
		free(o->osc_scheduler);
	}
	if(o->entrance_count_tab){
		hashtab_clear(o->entrance_count_tab);
		free(o->entrance_count_tab);
	}
	hashtab_delete(_cmmjl_obj_tab, x);
	if(hashtab_getsize(_cmmjl_obj_tab) == 0){
		free(_cmmjl_obj_tab);
		hashtab_clear(_cmmjl_instance_count);
		free(_cmmjl_instance_count);
	}
}
void paramui_menu_build(t_paramui *x)
{
	t_symobject	*item = NULL;
	
	if(!x->menu_items)
		return;

	linklist_clear(x->menu_items);
	item = (t_symobject *)symobject_new(x->attr_name);
	item->flags = 1;
	linklist_append(x->menu_items, item);
	item = (t_symobject *)symobject_new(gensym("-"));
	linklist_append(x->menu_items, item);
	item = (t_symobject *)symobject_new(gensym("Refresh Display of This Parameter"));
	linklist_append(x->menu_items, item);
	item = (t_symobject *)symobject_new(gensym("Set Parameter to Default Value"));
	linklist_append(x->menu_items, item);
	item = (t_symobject *)symobject_new(gensym("Edit Parameter Attributes"));
	linklist_append(x->menu_items, item);
}