add gc() and test to .onUnload: addresses #35