TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Disposable in Tinman.Core.System

Abstract implementation of the IDisposable interface.

abstract class Disposable implements IDisposable
  base of ApplicationBase
  ApplicationLoop
  ApplicationWindowBase
  BlockIndexBase
  BlockStorage
  Brush
  ByteBuffer
  Canvas
  CanvasContent
  CanvasFactory
  Component
  CorrectionLayer
  CsvGeoPathReader
  CsvReader
  CsvWriter
  DataCache
  DataModelBase
  DatasetCollection
  DatasetFileCache
  DataStreamBase
  DataUpdaterList
  Disposer
  Event
  FileBase
  FileSystem
  Grammar
  GrammarBuilder
  Graph
  Graphics
  GraphicsFence
  GraphicsTimer
  Heightmap
  HeightmapGrinder
  HeightmapPainter
  HeightmapProjector
  ImageReaderBase
  ImageWriter
  Initializable
  MeshBuffer
  MeshChunk
  MeshChunkBuilder
  MeshOptions
  ModelReaderBase
  ModelRenderer
  ModelScanner
  Monitor
  ObjectPoolBase
  Operation
  ParserContext
  PipelineStateStream
  PixelPyramidGrinder
  ProgressMonitor
  PyramidBase
  PyramidFileCache
  Renderer
  RenderPipeline
  ResourceBase
  ResourceCache
  ResourceLoader
  RingBuffer
  RunningOperation
  Scene
  SceneObject
  SceneOptions
  SceneView
  SerializableDisposableBase
  ShapeReader
  SimpleHttp
  Sky
  SourceCodeWriter
  StructuredBufferUpdater
  TaskGroup
  TaskPool
  TerrainBuffer
  TerrainLayer
  TerrainLayerRegion
  TerrainLayerSlot
  TerrainLayerTexture
  TerrainMesh
  TerrainView
  TexelBuffer
  TextStreamBase
  TextureAtlas
  TextureData2D
  Thread
  ThreadMainBase
  VertexUpdater
  WidgetDialogBuilder
  WidgetGui

Remarks

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

Public / Attributes

IsSoleOwnership

Will this object be disposed upon the next call to Dispose?

[ThreadSafe]
public property IsSoleOwnership { get }
type bool
value true if the object will be disposed when Dispose is called,
false if the object will not be disposed, because some other code is still holding shared ownership (see AcquireBase).
implements IDisposable.IsSoleOwnership

LifecycleState

Returns the lifecycle state of this object.

public property LifecycleState { get }
type LifecycleState
value The lifecycle state.
implements ILifecycleState.LifecycleState

Public / Methods

AcquireBase

Acquires a strong reference to this disposable object.

[OwnerReturn, Pure]
public method AcquireBase (bool allowNull = false)
type IDisposable
params allowNull Depicts what to do when this object is no longer valid:
true: return null
false: throw an exception
returns The strong reference to this disposable object or null iff allowNull is true and this object is no longer valid.
implements IDisposable.AcquireBase

Remarks:

The object will not be actually disposed by calls to IDisposable when there is at least one strong reference left. Code that calls this method is responsible for calling the IDisposable method accordingly.

This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.

Using this method usually requires type casting. Subclasses may additionally implement IDisposableGeneric, in order to provide some syntactic sugar for that.

Exceptions:

Dispose

Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.

[Dispose, OwnerThis, ThreadSafe]
public method Dispose ()
implements IDisposable.Dispose

Remarks:

The Dispose method silently returns if the object has already been disposed.

Implementing methods must not throw any exceptions.

Protected / Constructors

Disposable

Creates a new instance of Disposable.

protected constructor Disposable ()

Protected / Methods

DisposeResources

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

protected virtual method DisposeResources ()

Remarks:

This method will be called as soon as all ownership references to this instance have been relinquished by calls to the 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.

Logging

Logger

The logger object of this class.

public static readonly field Logger
type ILogger