static A getWeakRef(WeakReference ref) { ret ref == null ? null : ref!; }