Skip to content

Commit

Permalink
Merge pull request #26 from lsst-sitcom/tickets/DM-40276
Browse files Browse the repository at this point in the history
DM-40276: Free exposure memory explicitly
  • Loading branch information
mfisherlevine committed Aug 7, 2023
2 parents 5976e5c + f17bd2d commit 57c6b42
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/lsst/summit/extras/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import shutil
import uuid
import math
import gc

import matplotlib.pyplot as plt

Expand Down Expand Up @@ -311,6 +312,10 @@ def makePng(self, dataId, saveFilename):
self.fig.savefig(saveFilename)
logger.info(f'Saved png for {dataId} to {saveFilename}')

del toDisplay
del exp
gc.collect()

def pngsToMp4(self, indir, outfile, framerate, verbose=False):
"""Create the movie with ffmpeg, from files."""
# NOTE: the order of ffmpeg arguments *REALLY MATTERS*.
Expand Down

0 comments on commit 57c6b42

Please sign in to comment.