Skip to content
Snippets Groups Projects
Commit a482d264 authored by Boris Stefanovic's avatar Boris Stefanovic
Browse files

LAST MINUTE DEBUG MEMORY LEAK

parent 13fc6a10
No related branches found
No related tags found
No related merge requests found
......@@ -86,8 +86,12 @@ cluster_fpt_t** kmeans_init_clusters_fpt(const vector_fpt_t** points, const size
// check center is not already in clusters, although probability is extremely low...
valid = !is_vector_in_centers_fpt(center, (const cluster_fpt_t**) clusters, i);
}
cluster_destroy_fpt(clusters[i]);
clusters[i] = cluster_create_fpt(center);
}
// free
vector_destroy_fpt(min);
vector_destroy_fpt(max);
return clusters;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment