### Bug summary I can not close figure when use multiple figures. I use - macOS 14.5 (23F79). - Apple M1 Pro ### Code for reproduction ```Python import matplotlib.pyplot as plt import numpy as np a = np.arange(10) y = np.sin(a) plt.figure() plt.plot(a, y) plt.figure() plt.plot(a, y) plt.show() ``` ### Actual outcome https://github.com/matplotlib/matplotlib/assets/37545115/86c03ed7-ed48-4af1-b918-ba132edb4c3b ### Expected outcome I should close these figures immediately. ### Additional information _No response_ ### Operating system OS/X ### Matplotlib Version 3.8.4 ### Matplotlib Backend MacOSX ### Python version 3.12.3 ### Jupyter version _No response_ ### Installation conda