コード例 #1
0
ファイル: modena.c プロジェクト: mandarthombre/MoDeNa
void modena_model_destroy(modena_model_t *m)
{
    size_t j;
    for(j = 0; j < m->substituteModels_size; j++)
    {
        Py_DECREF(m->substituteModels[j].model);
        modena_inputs_destroy(m->substituteModels[j].inputs);
        modena_outputs_destroy(m->substituteModels[j].outputs);
        free(m->substituteModels[j].map_inputs);
        free(m->substituteModels[j].map_outputs);
    }
    free(m->substituteModels);

    free(m->parameters);
    free(m->inputs_min);
    free(m->inputs_max);

    free(m->argPos_used);

    modena_function_destroy(m->mf);

    Py_DECREF(m->pModel);

    m->ob_type->tp_free((PyObject*)m);
}
コード例 #2
0
ファイル: function.c プロジェクト: JMairhofer/MoDeNa
static void modena_function_t_dealloc(modena_function_t* self)
{
    modena_function_destroy(self);
}