Class MemoryBlock
- Namespace
- PaintDotNet
- Assembly
- PaintDotNet.Core.dll
Manages an arbitrarily sized block of memory. You can also create child MemoryBlocks which reference a portion of the memory allocated by a parent MemoryBlock. If the parent is disposed, the children will not be valid.
public sealed class MemoryBlock : IIsDisposed, IDisposable, ICloneable, ISerializable
- Inheritance
-
MemoryBlock
- Implements
- Inherited Members
Constructors
- MemoryBlock(MemoryBlock, long, long)
Creates a new MemoryBlock instance that refers to part of another MemoryBlock. The other MemoryBlock is the parent, and this new instance is the child.
- MemoryBlock(long)
Creates a new MemoryBlock instance and allocates the requested number of bytes.
Properties
- AllowWrites
Sets a flag indicating whether the memory that this instance of MemoryBlock points to may be written to.
Methods
- Clone()
Creates a new parent MemoryBlock and copies our contents into it
- CopyBlock(MemoryBlock, long, MemoryBlock, long, long)
Copies bytes from one area of memory to another. Since this function works with MemoryBlock instances, it does bounds checking.