/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="owner">Owner of memory</param>
 /// <param name="fileOffset">File offset of data</param>
 /// <param name="baseAddr">Address of data</param>
 /// <param name="length">Length of data</param>
 public unsafe UnmanagedMemoryImageStream(UnmanagedMemoryStreamCreator owner, FileOffset fileOffset, long baseAddr, long length)
 {
     this.fileOffset  = fileOffset;
     this.startAddr   = baseAddr;
     this.endAddr     = baseAddr + length;
     this.currentAddr = this.startAddr;
     this.owner       = owner;
 }
 /// <inheritdoc/>
 public void Dispose()
 {
     fileOffset  = 0;
     startAddr   = 0;
     endAddr     = 0;
     currentAddr = 0;
     if (ownOwner && owner != null)
     {
         owner.Dispose();
     }
     owner = null;
 }
 /// <summary>
 /// Saves <paramref name="creator"/> in this instance so it doesn't get garbage collected.
 /// </summary>
 /// <param name="creator">A <see cref="UnmanagedMemoryStreamCreator"/> instance</param>
 internal UnmanagedMemoryImageStream(UnmanagedMemoryStreamCreator creator)
     : this(creator, 0, 0, creator.Length)
 {
     this.ownOwner = true;
 }