RefCountDisposable Class

Represents a disposable that only disposes its underlying disposable when all dependent disposables have been disposed.

Inheritance Hierarchy

System.Object
  System.Reactive.Disposables.RefCountDisposable

Namespace:  System.Reactive.Disposables
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
Public NotInheritable Class RefCountDisposable _
    Implements IDisposable
'Usage
Dim instance As RefCountDisposable
public sealed class RefCountDisposable : IDisposable
public ref class RefCountDisposable sealed : IDisposable
[<SealedAttribute>]
type RefCountDisposable =  
    class
        interface IDisposable
    end
public final class RefCountDisposable implements IDisposable

The RefCountDisposable type exposes the following members.

Constructors

  Name Description
Public method RefCountDisposable Initializes a new instance of the RefCountDisposable class with the specified disposable.

Top

Properties

  Name Description
Public property IsDisposed Gets a value that indicates whether the object is disposed.

Top

Methods

  Name Description
Public method Dispose Disposes the underlying disposable only when all dependent disposables have been disposed.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetDisposable Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Reactive.Disposables Namespace