Skip to content
Snippets Groups Projects
Commit ea476a46 authored by Christoph Sprunk's avatar Christoph Sprunk
Browse files

Adding an implementation for egsl_free. It releases all unused memory...

Adding an implementation for egsl_free. It releases all unused memory currently held by the egsl_contexts.
parent 288bfbe9
No related branches found
No related tags found
No related merge requests found
......@@ -299,5 +299,13 @@ double egsl_atm(val v1, size_t i, size_t j){
return *egsl_atmp(v1, i, j);
}
void egsl_free(void){
int c;
for(c=0;c<=max_cid;c++) {
for(int i=egsl_contexts[c].nvars; i<egsl_contexts[c].nallocated; i++){
gsl_matrix_free(egsl_contexts[c].vars[i].gsl_m);
}
egsl_contexts[c].nallocated = egsl_contexts[c].nvars;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment