RefPtrp = new MyClass();
RefPtrp = obj.getAs ();
RefPtrp = new MyClass(); RefPtr q = p;
RefPtrPackage Library: The RefPtr class is commonly used in various C++ libraries, including Boost, GTKmm, and Qt. It is also included in the Poco C++ Libraries.p = new MyClass(); { RefPtr q = p; } // q gets destroyed, reference count decremented