automatic destruction of buffers