Home | History | Annotate | Download | only in coll

Lines Matching refs:Reference

19  * Base class for shared, reference-counted, auto-deleted objects.
23 * In Java, memory management (deletion after last reference is gone)
25 * but the reference counter is still used to see whether the referent is the sole owner.
33 * // Either use the nest class Reference (which costs an extra allocation),
39 * private SharedObject.Reference<S> s;
88 * Sharing requires reference-counting.
97 public static final class Reference<T extends SharedObject> implements Cloneable {
100 public Reference(T r) {
109 public Reference<T> clone() {
110 Reference<T> c;
112 c = (Reference<T>)super.clone();
126 * Returns a writable version of the reference.
127 * If there is exactly one owner, then the reference itself is returned.
128 * If there are multiple owners, then the reference is replaced with a clone,
187 * Returns the reference counter. Uses a memory barrier.