Object Hosting

Object hosting is a process of registering an object into some register (object host). Once the object is attached to the host, it becomes visible as a global entity. Any client (thread of execution) may find and hook the object and use its functionality. After the object is detached from the host it still may be in use, so the life-time control must be used to wait until the object is free and can be safely disposed. The AntiSem reference counting is used for this purpose.

Two object hosts are provides in CCore. ObjHost can host multiple polymorphic objects, identified by names. SingleHost can host a single object of the given type.