Using Mapped Memory Files in C# to store reference types
Posted
by Khash
on Stack Overflow
See other posts from Stack Overflow
or by Khash
Published on 2010-04-27T15:31:01Z
Indexed on
2010/04/27
15:33 UTC
Read the original article
Hit count: 353
I need to store a dictionary to a file as fast as possible. Both key and value are objects and not guaranteed to be marked as Serializable. Also I prefer a method faster than serializing thousands of objects. So I looked into Mapped Memory Files support in .NET 4. However, it seems MemoryMappedViewAccessor only allows storage of structs and not reference types.
Is there a way of storing the memory used by a reference type of a file and reconstructing the object from that blob of memory (without binary serialization)?
© Stack Overflow or respective owner