From 707e07045b2e9707b0f94165ba7067b2c9b3b518 Mon Sep 17 00:00:00 2001 From: Ian Harrison Date: Wed, 3 Aug 2022 12:01:24 +0100 Subject: [PATCH] added frees to get_ python functions --- hi_class_public/python/classy.pyx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hi_class_public/python/classy.pyx b/hi_class_public/python/classy.pyx index 41be883..bc46a30 100644 --- a/hi_class_public/python/classy.pyx +++ b/hi_class_public/python/classy.pyx @@ -1023,6 +1023,9 @@ cdef class Class: for index in range(timesteps): background[names[i]][index] = data[index*number_of_titles+i] + free(titles) + free(data) + return background def get_thermodynamics(self): @@ -1058,6 +1061,9 @@ cdef class Class: for index in range(timesteps): thermodynamics[names[i]][index] = data[index*number_of_titles+i] + free(titles) + free(data) + return thermodynamics def get_primordial(self): @@ -1094,6 +1100,9 @@ cdef class Class: for index in range(timesteps): primordial[names[i]][index] = data[index*number_of_titles+i] + free(titles) + free(data) + return primordial @@ -1244,6 +1253,9 @@ cdef class Class: else: spectra[ic_key] = tmpdict + free(titles) + free(data) + return spectra