'Declaration Public Shared Property ReUseArrays As Boolean
'Usage Dim value As Boolean DicomGlobal.ReUseArrays = value value = DicomGlobal.ReUseArrays
public static bool ReUseArrays {get; set;}
'Declaration Public Shared Property ReUseArrays As Boolean
'Usage Dim value As Boolean DicomGlobal.ReUseArrays = value value = DicomGlobal.ReUseArrays
public static bool ReUseArrays {get; set;}
Whilst the approach to array allocation pushed by Microsoft is "don't worry about it, just leave all memory management to the garbage collector", the reality is very different, and in practice, especially for "large" objects (>85kbytes - small by pixel standards)fragmentation can occur after prolonged use, leading to performance issues and even, on some systems, memory allocation failure, even when sufficient total memory should be available.
As of V8 therefore, DicomObjects attempts to "re-use" pixel arrays where possible, which it does by intercepting their release, and then adding them to a cache list, from which new allocations can be made if an array of sufficient (including possibly larger) size is available. The use of over-sized arrays can be prvented by use of the ReuseOnlyExactArraySize property.
If this property is set to false, then arrays are not re-used at all.