polyadic / funcky

Funcky is a Functional Library for C#
https://polyadic.github.io/funcky
Apache License 2.0
19 stars 4 forks source link

Prevent accidental disposal of original buffer #659

Closed bash closed 2 years ago

bash commented 2 years ago

The contract of Memoize is that the caller owns the returned disposable. Due to the optimization where we return immediately if the input is a buffer a caller might accidentally dispose a buffer that is owned by someone else.