Skip to content

Unmanaged resource leak #16

@Brain2000

Description

@Brain2000

If you only call Dispose( ) without Close( ) first, the ZSTD_freeCCtx( ) function is not called, eventually leading to an out of memory error after creating and disposing of about 200 compression streams.

Also, if the Close( ) function were to throw an error while flushing the ZSTD stream, the memory would also not be released.

I created a pull request that I believe corrects the issue without changing any behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions