Skip to content

materials: Review memory management

brgerhar requested to merge 33-materials-review-memory-management into master

Add ClusterModel class to take the remaining 2 virtual functions in Material and migrate all material derived classes to this new class. Then change material creation to create stack objects which contain unique_ptr to ClusterModel and therefore avoid potential memory leaks. Add ReducedMaterial class to use it the mesh class as assigning the solver's std::vector<Material> to the mesh's std::vector<Material> is no longer possible (Material class now contains std::unique_ptr with delete copy constructor).

Closes #33 (closed)

Merge request reports

Loading