removed garbage collection before taking memory measurement, which was causing cpu spikes