You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using a binary writer created by ion_writer_open_buffer(). When the data is written, the writer is closed. While doing the open, write(s) and close repeatedly, we've noticed increasing memory usage. The memory leak seems to be caused by the _value_stream in the _ion_binary_writer structure not getting closed when the writer is closed. Adding the following before closing the writer fixed the problem:
Thanks for reporting this, I created a PR fixing this.
For the second question. I looked into ion-c writer APIs but didn't find an obvious way to reuse the writer. I'll discuss this with our ion-c expert and update it here if I missed anything.
We are using a binary writer created by ion_writer_open_buffer(). When the data is written, the writer is closed. While doing the open, write(s) and close repeatedly, we've noticed increasing memory usage. The memory leak seems to be caused by the _value_stream in the _ion_binary_writer structure not getting closed when the writer is closed. Adding the following before closing the writer fixed the problem:
rc = ion_stream_close(writer->_typed_writer.binary._value_stream);
Also, is it possible to reuse the writer created with ion_writer_open_buffer() so could I skip the closing and creating a new writer?
Thanks!
The text was updated successfully, but these errors were encountered: