Fixed huge memory leak in resampler. Corrected tomo. example.