diff --git a/BeefLibs/corlib/src/IO/MemoryStream.bf b/BeefLibs/corlib/src/IO/MemoryStream.bf index 0980bb1c..53dbe501 100644 --- a/BeefLibs/corlib/src/IO/MemoryStream.bf +++ b/BeefLibs/corlib/src/IO/MemoryStream.bf @@ -4,7 +4,7 @@ namespace System.IO { class MemoryStream : Stream { - List mMemory = new List() ~ delete _; + List mMemory ~ delete _; int mPosition = 0; public override int64 Position @@ -44,6 +44,16 @@ namespace System.IO } } + public this() + { + mMemory = new List(); + } + + public this(List memory) + { + mMemory = memory; + } + public override Result TryRead(Span data) { let count = data.Length;