Skip to content

Commit 9d1588d

Browse files
committed
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.
1 parent db0365c commit 9d1588d

File tree

4 files changed

+1540
-1774
lines changed

4 files changed

+1540
-1774
lines changed

0 commit comments

Comments
 (0)