Object Reference Counting
  • The C++ language binding provides for explicit reference counting on stubs
    • Object_ptr CORBA::_duplicate( Object_ptr p ) static method
    • CORBA::_release( Object_ptr p ) static method
  • Allocation and destruction of stubs is not an issue--only the ORB does this
    • But user code must appropriately modify reference counts
  • Instead of doing this explictly it is best to do it implicitly through the generated _var classes
    • This pattern of usage will apply to other IDL types
  • _var classes are clever C++ wrappers around the corresponding raw pointer type
    • In mico you can read the templates in mico/var.h

Next Slide >>