DefaultObjectLifetimeStrategy

The DefaultObjectLifetimeStrategy is used internally by Island RTL to specify the default Life-Time Strategies for [Island-type objects]/Compiler/BackEnds/ObjectModels), on the Island-backed platforms.

In the case of WebAssembly it's:

[assembly:DefaultObjectLifetimeStrategy(typeOf(SimpleGC))]

While the other Island platforms use Boehm:

[assembly:DefaultObjectLifetimeStrategy(typeOf(BoehmGC), typeOf(ForeignBoehmGC))]

The first parameter is the default strategy. The second parameter is the strategy used when objects are not stored the same object model.

Note: DefaultObjectLifetimeStrategy is for internal use, and should not be applied in user code, unless that code is meant to entirely replace Island RTL.

You can use the LifetimeStrategyOverride Aspect to override the default Life-Time Strategy for specific types, or the Oxygene lifetimestrategy keyword to override it for individual variables.

Island Only

The DefaultObjectLifetimeStrategy aspect is available on the Island-backed platform only.

See Also