/* Reference-counted smart pointer class
- Copyright (C) 2016-2018 Free Software Foundation, Inc.
+ Copyright (C) 2016-2019 Free Software Foundation, Inc.
This file is part of GDB.
return m_obj;
}
+ /* Acquire a new reference and return a ref_ptr that owns it. */
+ static ref_ptr<T, Policy> new_reference (T *obj)
+ {
+ Policy::incref (obj);
+ return ref_ptr<T, Policy> (obj);
+ }
+
private:
T *m_obj;