Menu

Reference Class

2000-01-08
2000-05-10
  • Frank V. Castellucci

    We need a class that contains a class that reference counts the number of shares for read-only.

     
    • Jacob Blain Christen

      isn't this a special case of a smart pointer? Microsoft's COM/DCOM/ATL implementation (ATL::CComPtr<T>) comes to mind.  If you are un-familiar with this class it simple a smart pointer that does reference counting and executes the conained destructor when the reference count goes to zero.  I'm not sure what you mean by "number of shares for read-only" though.

       
      • Frank V. Castellucci

        In the context of copy on write was what the reference count meant. This is not wholly related to Smart Pointers. See Smart Pointer, Bridge, GoF, std::string, etc.

         
        • Anonymous

          Anonymous - 2000-05-09
           
          • Frank V. Castellucci

            I'm not as concerned about the implementation specifics as to whether it has a place in the core, or it is a framework construct.

            BTW: The snippet you noted is not multi-thread safe.

             

Log in to post a comment.

MongoDB Logo MongoDB