We should record the ownership of the data before we reset the bitwriter. Or we will always dup the buffer data and leak the memory. Part-of: <!886>