abstract class Tinman.Core.System.Disposable

Derived from


Extended by

ApplicationBase abstract
ApplicationLoop sealed
ApplicationWindowBase abstract
BlockIndexBase abstract
BlockStorage sealed
Brush abstract
ByteBuffer sealed
Canvas abstract
CanvasContent sealed
CanvasFactory abstract
Component abstract
CorrectionLayer sealed
CsvReader sealed
CsvWriter sealed
DataCache abstract
DataModelBase abstract
DatasetCollection abstract
DatasetFileCache sealed
DataStreamBase abstract
DataUpdaterList abstract
Disposer sealed
FileBase abstract
FileSystem abstract
GeodataPipeline sealed
GeoPathReader abstract
Grammar sealed
GrammarBuilder sealed
Graph sealed
Graphics sealed
GraphicsContext abstract
GraphicsFence abstract
GraphicsTimer abstract
Heightmap abstract
HeightmapGrinder sealed
HeightmapPainter sealed
HeightmapProjector sealed
ImageReaderBase abstract
ImageWriter abstract
MeshBuffer sealed
MeshChunk sealed
MeshChunkBuilder sealed
MeshOptions sealed
ModelInfo sealed
ModelReader abstract
ModelRenderer sealed
ModelScanner sealed
Monitor sealed
NativeLibrary abstract
ObjectPoolBase abstract
OpenFlightDatabase sealed
Operation abstract
ParserContext sealed
ParticleBuffer sealed
ParticleGeometry sealed
PipelineStateStream sealed
PixelPyramidGrinder sealed
ProgressMonitor sealed
PyramidBase abstract
PyramidFileCache sealed
RenderContext abstract
RenderEffect abstract
Renderer sealed
RenderPipeline sealed
RenderStageBase abstract
ResourceBase abstract
ResourceCache sealed
ResourceData abstract
ResourceLoader sealed
RingBuffer sealed
RootSignature sealed
RunningOperation sealed
Scene sealed
SceneData abstract
SceneObject abstract
SceneOptions sealed
SceneView sealed
SerializableDisposableBase abstract
ShapeReader abstract
SimpleHttp sealed
Sky sealed
SourceCodeWriter sealed
SpriteCache sealed
SpriteData sealed
Streaming sealed
StructuredBufferUpdater sealed
TaskGroup sealed
TaskPool sealed
TerrainBuffer sealed
TerrainLayer sealed
TerrainLayerRegion sealed
TerrainLayerSlot sealed
TerrainLayerTexture sealed
TerrainMesh sealed
TerrainView sealed
TexelBuffer abstract
TextStreamBase abstract
Thread sealed
ThreadMainBase abstract
Tutorial_GUI abstract
VectorImage abstract
VertexUpdater abstract
VisualCache sealed
Widget abstract
WidgetDialogBuilder sealed
WidgetGui sealed

Abstract implementation of the IDisposable interface.

A IDisposable object can hold references to the following types of resources:

  • Owned:
    References to IDisposable objects with Owner semantics.
    The references must be disposed in DisposeResources, in order to properly release ownership.

  • Managed:
    References to objects/arrays that are handled by the garbage collector resp. by smart pointers.
    These references should be cleared in DisposeResources, in order to help the underlying memory allocation system to perform efficiently.

  • Unmanaged:
    References to system resources that are not handled by the garbage collector resp. smart pointers.
    These references must be released properly in DisposeResources, to avoid memory leaks and dangling resources.

A class that provides the root method for initialization (which should be called Initialize) should use the following pattern (C#):

public virtual bool Initialize()
  if (!InitializeBegin())
    return false;

  // Your initialization code goes here.

  return true;

Derived classes should use this pattern (C#), to call the base initialization method:

public override bool Initialize()
  if (!base.Initialize())
    return false;

  // Your initialization code goes here.

  return true;

If for some reason, the base call to Initialize cannot be the first statement, use this pattern (C#):

public override bool Initialize()
  if (!InitializeRequired())
    return false;

  // Your initialization code goes here (first part).


  // Your initialization code goes here (second part).

  return true;

Protected / Constructors


protected constructor Disposable → (1)

initializable opt : bool = false

Does this object need to be initialized by calling its Initialize method? Defaults to false.

Creates a new instance of Disposable.

Protected / Methods


protected virtual method DisposeResources → ()

Disposes the resources held by a concrete subclass. This method will be called exactly once per instance.

This method will be called automatically as soon as all ownership references to this instance have been relinquished by calls to the IDisposable.Dispose method.

The system may garbage collect an instance of IDisposable iff there are no more references to it. In this case, the DisposeResources will be called, in order to avoid dangling resources. However, it is not advisable to rely on the garbage collection of the system, as the behaviour may differ significantly between environments. Instead, ownership rules should be obeyed, which effectively removes the need for automatic garbage collection.

Overriding methods must call the DisposeResources method of their base class. The base call should be the last statement. Other code should never call this method directly!


protected method InitializeBegin → ()

returns → bool

true if initialization must be performed,
false if initialization has already been performed.

Begins to initialize this object.


protected method InitializeRequired → ()

returns → bool

true if Initialize has already been called,
false if not.

Has this object been initialized?



public static readonly attribute Logger → (ILogger)

The logger object of this class.