Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Properties | List of all members
Smooth.Dispose.Disposable< T > Class Template Reference

Wrapper around a value that uses the IDisposable interface to dispose of the value. More...

Inheritance diagram for Smooth.Dispose.Disposable< T >:

Public Member Functions

void Dispose ()
 Relinquishes ownership of the wrapper, disposes the wrapped value, and returns the wrapper to the pool. More...
 
void DisposeInBackground ()
 Relinquishes ownership of the wrapper and adds it to the disposal queue. More...
 

Static Public Member Functions

static Disposable< T > Borrow (T value, DelegateAction< T > dispose)
 Borrows a wrapper for the specified value and disposal delegate. More...
 

Properties

value [get, set]
 The wrapped value. More...
 

Detailed Description

Wrapper around a value that uses the IDisposable interface to dispose of the value.

On AOT, this is a value type to avoid compute_class_bitmap errors.

On other platforms, it is a pooled object to avoid boxing when disposed by a using block with the Unity compiler.

Member Function Documentation

static Disposable<T> Smooth.Dispose.Disposable< T >.Borrow ( value,
DelegateAction< T >  dispose 
)
inlinestatic

Borrows a wrapper for the specified value and disposal delegate.

void Smooth.Dispose.Disposable< T >.Dispose ( )
inline

Relinquishes ownership of the wrapper, disposes the wrapped value, and returns the wrapper to the pool.

void Smooth.Dispose.Disposable< T >.DisposeInBackground ( )
inline

Relinquishes ownership of the wrapper and adds it to the disposal queue.

Property Documentation

T Smooth.Dispose.Disposable< T >.value
getset

The wrapped value.


The documentation for this class was generated from the following file: