예제 #1
0
/*****************************************************************************************
 *  Free memory allocated by this FMU instance.
 *  @param c The FMU.
 */
void fmiFreeSlaveInstance(fmi2Component c) {
        ModelInstance* component = (ModelInstance *) c;
        free_controller(component->controller);
        component->functions->freeMemory(component->input);
        component->functions->freeMemory(component->output);
        component->functions->freeMemory(component->dInput);
        component->functions->freeMemory(component);
}
예제 #2
0
파일: sca.c 프로젝트: mgschwan/blensor
void free_controllers(ListBase *lb)
{
	bController *cont;
	
	while ((cont = BLI_pophead(lb))) {
		if (cont->slinks)
			MEM_freeN(cont->slinks);
		free_controller(cont);
	}
}
예제 #3
0
void free_controllers(ListBase *lb)
{
	bController *cont;
	
	while ((cont= lb->first)) {
		BLI_remlink(lb, cont);
		if (cont->slinks) MEM_freeN(cont->slinks);
		free_controller(cont);
	}
}
예제 #4
0
파일: logic_ops.c 프로젝트: 244xiao/blender
static int controller_remove_exec(bContext *C, wmOperator *op)
{
    Object *ob = NULL;
    bController *cont = edit_controller_property_get(C, op, &ob);

    if (!cont)
        return OPERATOR_CANCELLED;

    BLI_remlink(&(ob->controllers), cont);
    unlink_controller(cont);
    free_controller(cont);

    WM_event_add_notifier(C, NC_LOGIC, NULL);

    return OPERATOR_FINISHED;
}