Use refcounted buffers for IO.

Need to use buffers multiple times when broadcasting.