alarm-clock-applet / alarm-clock

Alarm Clock is a fully-featured alarm clock for use with an AppIndicator implementation.
https://alarm-clock-applet.github.io
GNU General Public License v2.0
118 stars 31 forks source link

Memory leak #198

Closed FalcoGer closed 1 year ago

FalcoGer commented 4 years ago

I have left the alarm applet on for some time and using it for a bit now. After a few days it now uses 280+MB of ram. I have 5 timers and 1 alarm, all of which use the same 12MB mp3 file.

Top output

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 7092 ****      20   0 1530972 289748  18000 S   1,7  3,8 164:26.24 alarm-clock-app 

After setting up a 1 second timer alarm and playing the sound file a few times, the memory consumption went up by roughly 100kB every time I pressed the stop alarms button.

tatokis commented 1 year ago

There have been a few memory leaks that should now be fixed (especially one that would waste tons of memory just by having the UI visible). While I can still "reproduce" this with the procedure you indicated, the memory usage stops climbing after a few attempts, so I don't think it's an actual memory leak.

In addition, I ran the program (after the leak fixes) through valgrind massif and it seems to properly clean up resources after an alarm is stopped. alarm-massif

Thus, I think this can now be closed.