garbage collection in load.cpp