11 lines
488 B
Markdown
11 lines
488 B
Markdown
|
# What approach did you decide to follow?
|
||
|
I saved the adress in present_configuration to a new pointer old_configuration so i could delete it after running the step function:
|
||
|
// Simple fix to memleak:
|
||
|
float* old_configuration = present_configuration;
|
||
|
present_configuration = crw::step(size, present_configuration);
|
||
|
delete old_configuration;
|
||
|
float present_elongation = crw::elongation(size, present_configuration);
|
||
|
|
||
|
# determine the speedup
|
||
|
See 11_speedup.png
|