Sanity Check - will a stl::Container of new'd objects each be deleted when the container itself dies

Posted by Michael Dorgan on Stack Overflow See other posts from Stack Overflow or by Michael Dorgan
Published on 2010-05-13T02:02:38Z Indexed on 2010/05/13 2:24 UTC
Read the original article Hit count: 321

Filed under:
|
|
|

Title pretty much covers it. If I've added say 3 objects to a list and the list goes out of scope and dies, will it call delete on each entry before going out of scope? Pretty sure yes, but getting tired and need a sanity check.

© Stack Overflow or respective owner

Related posts about c++

Related posts about stl