NanoComp / libctl

Guile-based library implementing flexible control files for scientific simulations
GNU General Public License v2.0
19 stars 22 forks source link

Memory issue fix #57

Open jianguan210 opened 3 years ago

jianguan210 commented 3 years ago

CONTEX: The same pointer for a prism-typed object are used to point to a newly allocated array so that the previously allocated arrays do not have any pointer to control, thus memory leaks happen. We would like to avoid repeated new memory allocations, and reuse the existing arrays.

SCOPE:

  1. Allocate new arrays only at the first time call of the function "init_prism()".
  2. Free up memories created by pointers in the function "destroy_geom_box_tree()".