SWIG-wrapped LIGOTimeGPSVector seems to cause memory leak
If I create LIGOTimeGPSVector
's in Python using CreateTimestampVector
they seem to not get automatically cleaned up and this causes memory to leak, e.g., running:
import lal
import lalpulsar
for i in range(1000):
gpstimes = lalpulsar.CreateTimestampVector(100000)
for i, time in enumerate(np.ones(100000) * 900000000):
gpstimes.data[i] = lal.LIGOTimeGPS(time)
leads to the memory usage rising.
@karl-wette I assume this is because the DestroyTimestampVector
function isn't getting linked with the LIGOTimeGPSVector
type in the SWIG-wrappings, unlike the REAL8Vector
does with it equivalent Create and Destroy functions. Can this be fixed?