Assembly: DiscreteLogics.TeaFiles (in DiscreteLogics.TeaFiles.dll) Version: 184.108.40.206 (220.127.116.11)
public sealed class RawMemoryMapping<T> : IDisposable where T : struct, new()
[Missing <typeparam name="T"/> documentation for "T:TeaTime.RawMemoryMapping`1"]
Provides access to the item area via memory mapping. ItemAreaStart holds a raw byte pointer to the first item in the file, ItemAreaEnd a pointer past the last item. Such mapped access often provides best performance if large (many MB) or very large files (several GB or more) are accessed.
While this class can boost performance it comes with some drawbacks:
1. Usage requires unsafe context and bugs might be much harder to detect in unsafe terrain. 2. The raw byte pointers must be casted to the item type in order to access the items. 3. The TeaTime environment encourages usage of the template as item type. Pointers to this type cannot be created however. Usage of this class is therefore restricted to plain structs.