From 9555b1f59cd5851c5838f26b5e249ba1101b9f63 Mon Sep 17 00:00:00 2001 From: Nikola Date: Sun, 5 Jul 2026 01:29:04 +0200 Subject: [PATCH] Oops memory leak - Now fixed :) --- Implementierung/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Implementierung/main.c b/Implementierung/main.c index a93f6c9..d48ee4a 100644 --- a/Implementierung/main.c +++ b/Implementierung/main.c @@ -31,7 +31,7 @@ void benchmarking(size_t benchmarking_amount, int version_to_use, float complex printf("Benchmarking V0 - highly optimized SIMD + Threading implementation\n"); tricorn_implementation = tricorn; break; - case 1: // Uses unoptimised comparison implementation + case 1: // Uses unoptimised scalar comparison implementation printf("Benchmarking V1 - unoptimized comparison implementation\n"); tricorn_implementation = tricorn_V1; break; @@ -169,7 +169,6 @@ int main(int argc, char** argv) // fourth is "val" -> what to return when "--help" is given, returns "h" - int version_to_use = 0; // actual initial value _Bool colored = 0; // actual initial value _Bool will_benchmark = false; // actual initial value @@ -193,6 +192,7 @@ int main(int argc, char** argv) { case 'V': // done, function needed version_to_use = strtol(optarg,NULL,10); + printf("version is %d\n", version_to_use); // call different version functions @@ -338,6 +338,8 @@ int main(int argc, char** argv) { printf("\nDoing benchmarking. No images will be created\n"); benchmarking(amount_function_called,version_to_use,complexA,width,height,resolution,n,colored,tempArr); + free(tempArr); + free(output_data); return 0; }