Reorder chunk unloading to leave chunks in memory for the GC time before removal