Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RefCountable ¶
type RefCountable interface { // IncRef increments the reference count. IncRef() int32 // DecRef decrements the reference count. // When the reference count goes to zero, // an optional callback is executed. DecRef() int32 // RefCount returns the current reference count. RefCount() int32 }
RefCountable is an object that is reference counted.
type RefCounter ¶
type RefCounter struct {
// contains filtered or unexported fields
}
RefCounter is a reference counter.
func NewRefCounter ¶
func NewRefCounter() *RefCounter
NewRefCounter creates a new reference counter, with an initial refcount of 1.
func (*RefCounter) DecRef ¶
func (c *RefCounter) DecRef() int32
DecRef decrements the ref count, and optionally executes the callback where applicable.
func (*RefCounter) RefCount ¶
func (c *RefCounter) RefCount() int32
RefCount returns the current reference count.
Click to show internal directories.
Click to hide internal directories.