mirror of
https://github.com/transmission/transmission
synced 2024-12-23 00:04:06 +00:00
Send dummy events each second to prevent excessive memory use (inspired by xnyhps)
I'm not that good in Mac programming it seems as I can't figure out why doesn't the memory being allocated by frequent NSNewBitmapBackingStore (system internal) calls being freed even if I wrap the code into @autoreleasepool explicitly. Disabling animations does slow it down but not stop. This commit is certainly a dirty fix but it seems to work in my case and I hope it helps a few other people while we wait for a proper solution.
This commit is contained in:
parent
adde87a99e
commit
f1010159a6
1 changed files with 3 additions and 0 deletions
|
@ -590,6 +590,9 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
|||
[[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSModalPanelRunLoopMode];
|
||||
[[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSEventTrackingRunLoopMode];
|
||||
|
||||
#warning FIXME: https://forum.transmissionbt.com/viewtopic.php?f=4&t=16519
|
||||
[NSEvent startPeriodicEventsAfterDelay: 0 withPeriod: 1];
|
||||
|
||||
[self applyFilter];
|
||||
|
||||
[fWindow makeKeyAndOrderFront: nil];
|
||||
|
|
Loading…
Reference in a new issue