Queue a GC when a toggle reference goes from >1 to 1
This is my hacky approach to the problem. This runs the GC much less than expected
but more than what would be acceptable (@chergert's idea make it runs much less than my original approach). But it definitely holds the GNOME Shell memory at the same plateu for a long, long time, helping gnome-shell#64 (closed) not happen.
Some ideas that are worth considering:
Use a timeout instead of an idle add (it appearently didn't have the same effectiveness though...)
- Don't force GC but instead improve the current heuristics
- What else?
Issue: #140 (closed)