Kerbal Space Program
1.12.4
|
Wrapper around a value that uses the IDisposable interface to dispose of the value. More...
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 | |
T | value [get, set] |
The wrapped value. More... | |
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.
|
inlinestatic |
Borrows a wrapper for the specified value and disposal delegate.
|
inline |
Relinquishes ownership of the wrapper, disposes the wrapped value, and returns the wrapper to the pool.
|
inline |
Relinquishes ownership of the wrapper and adds it to the disposal queue.
|
getset |
The wrapped value.