Skip to content

Question: Is it safe to use PrefixingBufferWriter without calling Commit()? #344

@rmja

Description

@rmja

Hi,

I am using the PrefixingBufferWriter in a context that may throw after bytes have been written to it.
It does not implement IDisposable, yet it seems that it may have a sequence memory pool allocation if writing has started. I can see that the sequence is reset/memory returned when Commit() is called. But, how do I ensure that the allocated sequence is correctly returned to the pool in the case where Commit() is not called on a writer?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions