Try to improve memory usage by garbage collection.