Table of Contents

Constructor Cleanup

Namespace
SodaFlow
Assembly
SodaFlow.Core.dll

Cleanup(Action)

Initializes a new instance of the Cleanup class which runs cleanup when this object is garbage collected.

public Cleanup(Action cleanup)

Parameters

cleanup Action

The action to run when this object becomes unreachable.

Remarks

This is finalization and not disposal. The action runs at a time that the garbage collector selects. To run it at a known time, call CleanupNow. For an object that must be released immediately, use IDisposable.