ERY.AgateLib.Utility.RefCounter< T > Class Reference

Class which implements a reference counter around a Disposable object. The object is disposed when the reference count drops to zero. This class should not be used directly, instead use the Ref<T> structure. More...

List of all members.

Public Member Functions

 RefCounter (T obj)
 Constructs a RefCounter object around the specified object.
void AddRef ()
 Increases the reference count.
void Dispose ()
 Decreases the reference count, and if it hits zero Dispose is called on the object.
int GetRefCount ()
 Returns the number of references. This is meant for debugging purposes only, do not write code which calls Dispose until GetRefCount drops to zero.

Properties

Value [get]
 Gets the object this is wrapped around.
bool IsDisposed [get]
 Returns true if the object has had its Dispose member called, and thus no more calls on that object should be made.


Detailed Description

Class which implements a reference counter around a Disposable object. The object is disposed when the reference count drops to zero. This class should not be used directly, instead use the Ref<T> structure.

[Experimental - This class may disappear in the future.]

<typeparam name="T"></typeparam>


Constructor & Destructor Documentation

ERY.AgateLib.Utility.RefCounter< T >.RefCounter ( obj  ) 

Constructs a RefCounter object around the specified object.

Parameters:
obj 


Member Function Documentation

void ERY.AgateLib.Utility.RefCounter< T >.AddRef (  ) 

Increases the reference count.

void ERY.AgateLib.Utility.RefCounter< T >.Dispose (  ) 

Decreases the reference count, and if it hits zero Dispose is called on the object.

int ERY.AgateLib.Utility.RefCounter< T >.GetRefCount (  ) 

Returns the number of references. This is meant for debugging purposes only, do not write code which calls Dispose until GetRefCount drops to zero.

Returns:


Property Documentation

T ERY.AgateLib.Utility.RefCounter< T >.Value [get]

Gets the object this is wrapped around.

bool ERY.AgateLib.Utility.RefCounter< T >.IsDisposed [get]

Returns true if the object has had its Dispose member called, and thus no more calls on that object should be made.


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo