You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactoring: replace custom reference counting by std::shared_ptr
- For the template engine the following changes were made:
- TemplateVariant now stores a std::shared_ptr for TemplateListIntf and
TemplateStructIntf instead of a raw pointer.
- In context.cpp SharedPtr has been replaced by std::shared_ptr
- Instead of Context object all implementing RefCountedContext now
std::shared_ptr's are used to manange the livetime of objects;
TemplateListIntfPtr and TemplateStructIntfPtr
- Internally two generic implementations are used TemplateList and
TemplateStruct, also these are managed via std::shared_ptr.
- To avoid cyclic references; the TemplateVariant type can also
hold weak references to TemplateStructIntf and TemplateListIntf.
- Context class alloc() functions now return either a
TemplateListIntfPtr or a TemplateStructIntfPtr for more uniform
handling of the objects.
0 commit comments