mirror of
https://github.com/keycastr/keycastr.git
synced 2026-05-15 14:15:50 -06:00
[GH-ISSUE #282] Potential Memory Leak? #240
Labels
No labels
bug
compatibility
discussion
documentation
enhancement
help wanted
help wanted
investigation needed
pull-request
release
visualizer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/keycastr#240
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @qinyuhang on GitHub (Nov 10, 2023).
Original GitHub issue: https://github.com/keycastr/keycastr/issues/282
Hi, After using keycastr for a while (2 week on the background without casting key), the memory usage of keycastr is running up to 7GB.
@akitchen commented on GitHub (Nov 10, 2023):
Thank you for opening an issue; are you saying that keycasting was disabled during that time?
@akitchen commented on GitHub (Nov 22, 2023):
I haven't seen anything close to this kind of memory utilization, nothing over 100-150MB (which already seems high to me, but no signs of a leak)
What more can you say about your setup? One can see that you are running in Chinese locale, but are you using any other applications which monitor or generate input events or interfere with the windowing system? And to be clear, did you have keycasting disabled during this time, or simply weren't using your computer? If keycasting wasn't disabled, which visualizer were you using?
I'm inclined to close this, but if there's any more information that can be provided, I'm still interested in investigating.
@qinyuhang commented on GitHub (Nov 30, 2023):
Hi, during the time, keycastr was disabled, not casting keys. What confused me is that I can't reproduce the situation. I'll dig into find how to reproduce it.
@akitchen commented on GitHub (Nov 30, 2023):
Thanks for the additional info. I did run a long-running session in the profiler and saw some large memory growth in Apple framework internals, but I think it was due to zombie and ref count monitoring and not actually a bug. Running outside of the profiler, I don't yet see this kind of growth but I will keep trying.
This did help pinpoint an optimization we can do, where fewer objects would be created and thrown away into the autorelease pool during normal usage of the app. I don't think that's related to what you were seeing, because this codepath is disabled when casting is disabled, but it still seems like a good idea to pursue. I'll keep looking into it as well.
@akitchen commented on GitHub (Jan 5, 2024):
I'm going to close this out; there isn't evidence of a significant memory leak, but running in the profiler or with different memory debugging options enabled can cause unexpected growth as objects are kept around for zombie detection or other inspection.