diff options
Diffstat (limited to 'lib/Plugins.Essentials/src/Extensions')
-rw-r--r-- | lib/Plugins.Essentials/src/Extensions/JsonResponse.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Plugins.Essentials/src/Extensions/JsonResponse.cs b/lib/Plugins.Essentials/src/Extensions/JsonResponse.cs index 549d746..b418b6f 100644 --- a/lib/Plugins.Essentials/src/Extensions/JsonResponse.cs +++ b/lib/Plugins.Essentials/src/Extensions/JsonResponse.cs @@ -57,8 +57,8 @@ namespace VNLib.Plugins.Essentials.Extensions //Alloc buffer _handle = MemoryUtil.Shared.Alloc<byte>(4096, false); - //Consume handle for stream, but make sure not to dispose the stream - _asStream = VnMemoryStream.ConsumeHandle(_handle, 0, false); + //Create stream around handle and not own it + _asStream = VnMemoryStream.FromHandle(_handle, false, 0, false); //Get memory owner from handle _memoryOwner = _handle.ToMemoryManager(false); |