Switches to set the detaching behavior for referencing storages.
| C# | Visual Basic | Visual C++ |
public enum ILDetachingBehavior
Public Enumeration ILDetachingBehavior
public enum class ILDetachingBehavior
| Member | Description |
|---|---|
| DetachNever |
if used, ILArray's will never automatically detach. This can
lead to situations, where altering the elements of one array also change
the elements of another array, if the second is referencing the same solid
array elements.
|
| DetachOnWrite |
(default) - Referencing arrays will automatically detach
themself before attempting to alter any values used. The results are self
dereferencing arrays which act to the outside world, like they would
all consist out of solid storages, but internally save memory by not creating
any real copies of arrays as long as it is not absolutely neccessary.
|
| DetachAlways |
Attempts to create a reference of an existing array will result
in copying the values. This is the way other (native) mathematical engines usually handle
their storages. It consumes more memory, but will sometimes
lead to increased performance for large computations, since physical storages
are optimized for faster element access.
|
| DetachSave |
This value acts like 'DetachOnWrite' except a storage will not
be detached, if it is the only reference to the underlying physical storage.
|
Special attention is to be made for altering ranges on reference storages. There are
cases where setting a value may alter other elements as well. This is true
for elements "pointing" to the same physical array elements. If you dont want
this behavior, set this switch to 'DetachAlways' so you wont have to worry about
storages beeing references anymore. This behavior may be known as similar
to other mathematical engines (like Matlab f.e.).
The default switch is 'DetachOnWrite'.