/***************************************************************************************** * 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); }
void free_controllers(ListBase *lb) { bController *cont; while ((cont = BLI_pophead(lb))) { if (cont->slinks) MEM_freeN(cont->slinks); free_controller(cont); } }
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); } }
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; }