convenient binding for closing buffers