Retain byte buffers
laforge49 opened this issue · comments
Once a list or map node is serialized, its byte buffer should be retained. No point in recreating it a second time, as these nodes are otherwise immutable.
Similarly when deserializing, a slice of the original byte buffer is passed to the constructor of the list or map node.
But once the content of a byte buffer is transcribed while reserializing, we can drop its deserialized data. (This plugs a memory leak and keeps the overall memory footprint reasonable.)
all done, working, but limited testing