Skip to content

Commit

Permalink
Added a potential fix for possible memory leak in supernova tail prod…
Browse files Browse the repository at this point in the history
…uction.
  • Loading branch information
transientlunatic committed Jul 17, 2018
1 parent 7017de9 commit f46a848
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions minke/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,8 @@ def _generate(self, rate=16384.0, half=False, distance=None, tail = True):
hp_data = np.append(hp.data.data,tail_hp.data)
hx_data = np.append(hx.data.data,tail_hx.data)

del tail_hp, tail_hx

tail_hp = lal.CreateREAL8Vector(len(hp_data))
tail_hp.data = hp_data
tail_hx = lal.CreateREAL8Vector(len(hx_data))
Expand All @@ -555,6 +557,7 @@ def _generate(self, rate=16384.0, half=False, distance=None, tail = True):
hp.data = tail_hp
hx.data = tail_hx

del tail_hp, tail_hx

return hp, hx, hp0, hx0

Expand Down

0 comments on commit f46a848

Please sign in to comment.