properly reset variables to allow gc'ing already processed data immediately