should we `null` the buffers on error/end? thinking about memory leaks.