Closes the resource reader after releasing any resources associated with it