Struct xpcom::RefPtr [] [src]

pub struct RefPtr<T: RefCounted + 'static> { /* fields omitted */ }

A smart pointer holding a RefCounted object. The object itself manages its own memory. RefPtr will invoke the addref and release methods at the appropriate times to facilitate the bookkeeping.

Methods

impl<T: RefCounted + 'static> RefPtr<T>
[src]

[src]

Construct a new RefPtr from a reference to the refcounted object.

[src]

Construct a RefPtr from a raw pointer, addrefing it.

[src]

Construct a RefPtr from a raw pointer, without addrefing it.

[src]

Write this RefPtr's value into an outparameter.

Trait Implementations

impl<T: RefCounted + 'static> Deref for RefPtr<T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T: RefCounted + 'static> Drop for RefPtr<T>
[src]

[src]

Executes the destructor for this type. Read more

impl<T: RefCounted + 'static> Clone for RefPtr<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more