Closed RaynaldM closed 6 months ago
Maybe that could be a solution too: https://github.com/microsoft/Microsoft.IO.RecyclableMemoryStream
@RaynaldM What about tests?
My dev process rule: "Don't review PR code if no unit tests" 😉
@ggnaegi In your opinion, could we add some memory loading/consuming benchmarks here?
@RaynaldM What about tests?
My dev process rule: "Don't review PR code if no unit tests" 😉
UT are already present in OutputCacheMiddlewareTests
and in ResponderMiddlewareTests
.
@RaynaldM commented Dec 8, 2023
:ok: I'll look into these tests...
<<<<<<< 1839-hunting-for-memory-leaks
var content = Convert.FromBase64String(cached.Body);
var byteArrayContent = new ByteArrayContent(content);
=======
var content = new MemoryStream(Convert.FromBase64String(cached.Body));
var streamContent = new StreamContent(content);
>>>>>>> develop
I've resolved this conflict in favor of changes in feature branch. Hope it is right.
Is this PR still actual?
@RaynaldM If you don't mind, I will delete feature branch too. I don't see any goals to keep the branch opened. But GitHub allows to restore it one day.
We've added "using" on some streams to make sure they're properly disposed.