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.