Listing 5: Partial listing of class dll_object_ptr

template< class object >
class dll_object_ptr
  {
    typedef dll_object_ref< object > ref_type;
  public:

    // not shown, default and copy constructors
    ...

    dll_object_ptr
      ( dll_sentinel&      dll
      , std::string const& func_name )
      : m_obj( new ref_type( dll , func_name ) )
      { }

    // not shown: functions release, reset, operator->,
    // get, and operator*
    ...

  private: // data

    ref_type*    m_obj;

  }; // class dll_object_ptr< >