fix a bug off when drop a chunk from memory data holder

decrease the counter
add a new parameter to determine the method dealing with intermediate output