implement Close for statements.