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 26, 2024
1 parent eacafda commit fe7ba37
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 fe7ba37

Please sign in to comment.