Closing window does not clear memory on macOS #3265
-
First, thanks for everyone building this - I have been waiting eagerly to finally use this, it's a really awesome project! I downloaded it and was curious about memory usage, then noticed something, when closing a ghostty window (not quitting) the memory does not clear as seen in the video below. Im using macOS. Screen.Recording.2024-12-27.at.3.03.06.AM.mov |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There shouldn't be any memory leaks (we've run under both Valgrand and debug mode uses a leak detecting allocator). macOS memory metrics in Activity Monitor are quite strange. You first off definitely don't want the "Memory" column because that includes all sorts of stuff, you probably want "Real Memory." With that, I'm seeing it go up and down but I've also seen it not and I've been taught that macOS tends to not free memory if. memory is available (unused RAM is wasted RAM and keeping it allocated in an app makes future mallocs faster). I've converted this to a discussion so we can look into things and get more information. But at the moment, I'm not seeing anything that's concerning. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the fast and detailed explanation, and you are right! I did not know that was a thing on macOS, the "Memory" not actually being the currently used memory of a application. I turn on Real Memory, and I saw that it was still happening on a smaller scale, then I opened a application that was heavy on memory, to see if macOS would clear the unused ghostty memory just to be sure and it did! Sorry for wasting you time, and happy holidays! |
Beta Was this translation helpful? Give feedback.
Thanks for the fast and detailed explanation, and you are right! I did not know that was a thing on macOS, the "Memory" not actually being the currently used memory of a application. I turn on Real Memory, and I saw that it was still happening on a smaller scale, then I opened a application that was heavy on memory, to see if macOS would clear the unused ghostty memory just to be sure and it did! Sorry for wasting you time, and happy holidays!