Maccy
Maccy copied to clipboard
Maccy After being used in the background for many times, the memory occupation increases linearly
Operating environment
- Device: MacBook Pro 14`2021
- macOS: Monterey 12.3
- Maccy Version: 0.22.2
Describe the problem
After running Maccy for a long time and using it for many times, the memory occupation of the application will gradually increase (it seems to grow linearly and there is no sign of release). It can be recovered after restarting the application. I hope the author can fix this problem, thank you.
Device: MacBook Pro 14`2021 macOS: Monterey 12.3.1 Maccy Version: 0.22.2
I have this same issue; when Maccy starts on my machine, it uses 24.9MB ram. After some time (several days), ram usage goes up to 350-500MB. Clearing the history doesn't reclaim any ram; closing and restarting Maccy does.
There's clearly a memory leak going on somewhere.
Device: MacBook Air (M1) macOS: Monterey 12.3.1. Maccy Version: 0.22.2
In my case Maccy takes up 1.38 GB.

The way Maccy uses Core Data could probably be improved to avoid memory bloat - right now every new copy is kept in-memory so if you copy large images (for example) - it can increase over time. I need to see if there is a way to make Core Data work in a different way by offloading unused items from memory.
Alex thx for this.
From the behaviour I've seen on my machine, it appears that references even to deleted items are being retained. The memory usage remains the same even after deleting all items by doing a 'Clear'. Shutting down & restarting Maccy is the only way to reclaim the memory.
What's the status of this issue?
No progress at the moment.
Is it the same how Microsoft Windows store (Windows+V) clipboard items, via memory?
I'm thinking if there should be an option to store locally or via memory.
Maybe users have set a large history size? And a lot of images copied.(Just random guess)
Maybe users have set a large history size? And a lot of images copied.(Just random guess)
It's not the case: I can reproduce with small text entries also. Just wait some time and the memory increase progressively
it often gets dangerously close to 2gb...
I've been looking into this issue a few times already and I don't know what can be improved at the moment. Here is a simple video showing that Maccy keeps text/images in memory but offloads at least a portion of it whenever it's closed.
- Start with clean Maccy. ~36MB
- Copy long text. ~41MB
- Copy screenshot. ~120MB when Maccy is visible, ~80MB when closed
If somebody understands Core Data and ways to lower memory consumption, I'd be happy to implement the recommendations, but I don't know what to do with this.
https://github.com/p0deje/Maccy/assets/665846/37bca9b4-9521-455d-87c7-02efa633d499
cring😭 1.2GB
@tony-swg Do you copy lots of images or just text?
@tony-swg Do you copy lots of images or just text?
yes, both
After updating my system to Sonoma and Maccy to latest version, with each opening (command shift c) the memory usage increases by around 300kb
Same issue
Folks, I get it - there is no need to post screenshots of RAM usage. It would be more helpful if someone would actually suggest ways to reduce the memory overhead or, ideally, send a PR.
Folks, I get it - there is no need to post screenshots of RAM usage. It would be more helpful if someone would actually suggest ways to reduce the memory overhead or, ideally, send a PR.
I have no idea what cause this problem. But I suggest you could publish a build with regular relaunch the main program for quick fix.
Has this memory leak been fixed yet?
Maccy's memory leak is draining my RAM!