This is a Winform C # 3.0 issue.
I want to clone a large (not really large) complex object. To do this lazily, I serialized it to a MemoryStream and used the BinaryFormatter.UnsafeDeserialize (MemoryStream, null) method to get the cloned object. Inside the UnsafeDeserialize () method, an OutOfMemory exception always occurs. The memory should be sufficient.
I read a little about this as a .net error, but am not sure if it is here.
Does anyone know why this is happening? Any desktop? Thank.
source
share