From c9bb75b733f7b1e75fad17db8d99ac771a5e819b Mon Sep 17 00:00:00 2001
From: Daichi Tsuna <daichi.tsuna@ligo.org>
Date: Thu, 29 Nov 2018 00:49:57 -0800
Subject: [PATCH] snglbursttable.c: enable memory de-allocation

---
 gstlal-burst/python/snglbursttable.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gstlal-burst/python/snglbursttable.c b/gstlal-burst/python/snglbursttable.c
index 1d90e19e04..20ac3d10e1 100644
--- a/gstlal-burst/python/snglbursttable.c
+++ b/gstlal-burst/python/snglbursttable.c
@@ -139,6 +139,12 @@ static PyObject *__new__(PyTypeObject *type, PyObject *args, PyObject *kwds)
 }
 
 
+static void __del__(PyObject *self)
+{
+	Py_TYPE(self)->tp_free(self);
+}
+
+
 static PyObject *from_buffer(PyObject *cls, PyObject *args)
 {
 	const char *data;
@@ -208,6 +214,7 @@ static PyTypeObject gstlal_GSTLALSnglBurst_Type = {
 	.tp_getset = getset,
 	.tp_name = MODULE_NAME ".GSTLALSnglBurst",
 	.tp_new = __new__,
+	.tp_dealloc = __del__,
 };
 
 
-- 
GitLab