Lines Matching refs:delegate
37 * native methods by "delegate calls".
50 * Native methods usually always have the int as parameters. The first thing the delegate method
61 * the delegate to/from a list. This list hold the reference and prevents the GC from reclaiming
62 * the delegate.
64 * - {@link #addNewDelegate(Object)} also adds the delegate to a {@link SparseArray} that holds a
65 * {@link WeakReference} to the delegate. This allows the delegate to be deleted automatically
66 * when nothing references it. This means that any class that holds a delegate (except for the
70 * @param <T> the delegate class to manage
88 * Returns the delegate from the given native int.
92 * If the int is non zero and the delegate is not found, this will throw an assert.
95 * @return the delegate or null if not found.
99 T delegate = mDelegates.get(native_object);
102 if (delegate == null) {
108 assert delegate != null;
109 return delegate;
115 * Adds a delegate to the manager and returns the native int used to identify it.
116 * @param newDelegate the delegate to add
117 * @return a unique native int to identify the delegate
133 * Removes the main reference on the given delegate.
134 * @param native_object the native integer representing the delegate.
137 T delegate = getDelegate(native_object);
144 mJavaReferences.remove(delegate);