Struct Ref
Reference counting support.
Implemented for case when T is RefCountedObject.
Similar to shared_ptr in C++.
Allows to share object, destroying it when no more references left.
Useful for automatic destroy of objects.
Constructors
| Name | Description |
this
(data)
|
init from T
|
Fields
| Name | Type | Description |
_data
|
T | |
Properties
| Name | Type | Description |
get[get]
|
T | returns object reference (null if not assigned)
|
get[get]
|
const(T) | returns const reference from const object
|
isNull[get]
|
bool | returns true if object is not assigned
|
refCount[get]
|
int | returns counter of references
|
Methods
| Name | Description |
clear
()
|
clears reference
|
opAssign
(data)
|
assign from another refcount by reference
|
opAssign
(data)
|
assign from another refcount by value
|
opAssign
(data)
|
assign object
|