A component is a polymorphic object that can only be created in dynamic memory. Components inherit from BaseComponent. They have polymorphic reflection information and support reference counting for automatic life management.

These classes have an overhead of the vtable (pointer) + the reference counter (int32). Components are managed through the Ptr smart pointer. Components support also the concept of implementing interfaces. An interface is a virtual pure class without data and deriving from Interface. The Ptr smart pointer is able to cast between different interfaces and implementation classes using the run-time type information available through the reflection system. Life time of components is automatically managed by smart pointers. Components must not be destroyed with delete. They are automatically destroyed by the Ptr<> template (that invokes the Release() method)

© 2017 Noesis Technologies