Skip to content

Commit

Permalink
docs: close matplotlib figure to avoid memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Feb 16, 2024
1 parent 89efd5d commit 8c4d072
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions solara/website/pages/examples/general/live_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def LiveUpdatingComponent(counter):
"""Component which will be redrawn whenever the counter value changes."""
fig, ax = plt.subplots()
ax.plot(np.arange(10), np.random.random(10))
plt.close(fig)
solara.FigureMatplotlib(fig)


Expand Down

0 comments on commit 8c4d072

Please sign in to comment.