Skip to content

Commit

Permalink
Merge pull request #30 from sngpt08/patch-1
Browse files Browse the repository at this point in the history
Memory leaks detected Issue #26
  • Loading branch information
dav authored May 10, 2021
2 parents 9b8b580 + 2cc66fe commit fb15097
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/word2vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ void TrainModel() {
pthread_t *pt = (pthread_t *)malloc(num_threads * sizeof(pthread_t));
for (a = 0; a < num_threads; a++) pthread_create(&pt[a], NULL, TrainModelThread, (void *)a);
for (a = 0; a < num_threads; a++) pthread_join(pt[a], NULL);
free(pt);
#endif

fo = fopen(output_file, "wb");
Expand Down

0 comments on commit fb15097

Please sign in to comment.