ArrayPoolingStrategy Enumeration
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.0-rc.1
public enum ArrayPoolingStrategy
Public Enumeration ArrayPoolingStrategy
public enum class ArrayPoolingStrategy
type ArrayPoolingStrategy
| Never | 0 |
Indicates that no array pooling occurs when creating IBitmapData instances by the self-allocating factory methods.
This strategy will always use the best matching element type for the underlying buffer.
|
| IfByteArrayBased | 1 |
Specifies that array pooling occurs only if the natural buffer element type of the created IBitmapData instance is byte anyway.
This is the case for indexed pixel formats in the KnownPixelFormat enumaration.
|
| IfCanUseByteArray | 2 |
Specifies that array pooling always occurs if the created IBitmapData instance can use a byte array as its buffer.
This is true for all pixel formats as long as the size of the underlying buffer does not exceed the maximum size of a byte array.
Please note that the default array pool may not cache large arrays, and that accessing the reinterpreted elements may be
slightly slower than using the best matching element type.
|
| AnyElementType | 3 |
Uses array pooling (if available on the current platform) for any element type. This may consume more memory than the other strategies,
but there is no performance penalty for reinterpreting the elements.
|