@@ -41,7 +41,7 @@ namespace System.IO
public class UnmanagedMemoryStream : Stream
{
long length;
- bool closed;
+ internal bool closed;
long capacity;
FileAccess fileaccess;
IntPtr initial_pointer;
@@ -70,7 +70,7 @@ namespace System.Reflection {
protected override void Dispose (bool disposing)
- if (_isOpen) {
+ if (!closed) {
/*
* The returned pointer points inside metadata, so
* we have to increase the refcount of the module, and decrease
@@ -109,7 +109,7 @@ namespace System.Resources
Marshal.FreeHGlobal (ptr);
}