From my experience, GC sometime fails to free unused memory. Calling `GC.gc()` after each sweep may be safe, and will be cheap enough.