If you use strings, concat strings, etc, you make new objects. Those pile up, and the GC kicks in.
As for collecting things, one approach is to have as much things in memory at startup as possible, and instead if removing them, you simple disable them instead if destroying them. That way the won’t be garbage collected.