Skip to content

Remove Model::disownAllComponents() method and fix test cases accordingly #148

@aymanhab

Description

@aymanhab

The method Model::disownAllComponents() was introduced to work around improper memory management when stack allocated objects are added to a Model that takes ownership of them, it potentially introduces leaks (since no components are deallocated on Model destruction) and promotes improper use of stack allocated objects (mostly seen in test cases). Per discussion with @sherm1 and @aseth1 we'll stick to heap allocated Models and ModelComponents (using new) so that we don't have to invoke the above method.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions