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 Dec 15, 2023
1 parent aa6f3e5 commit 309eadd
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 309eadd

Please sign in to comment.