<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 01/02/12 11:59, Noel Grandin wrote:
<blockquote cite="mid:4F29293E.4020908@peralex.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<br>
<br>
On 2012-02-01 13:58, Noel Power wrote:
<blockquote cite="mid:4F2928EA.1070809@suse.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<br>
e.g. I removed the maLayoutNames.clear() from
:~SdPresLayoutDlg() as the vector will go out of scope here
anyway and delete the container contents. <br>
<br>
</blockquote>
<br>
Really? <br>
I wasn't sure about that - the boost documentation isn't that
great.<br>
So I scanned the LibO codebase and other places that use a
ptr_vector are doing clear().<br>
</blockquote>
I agree I find the boost documentation... sparse,
<a class="moz-txt-link-freetext" href="http://www.boost.org/doc/libs/1_48_0/libs/ptr_container/doc/ptr_container.html">http://www.boost.org/doc/libs/1_48_0/libs/ptr_container/doc/ptr_container.html</a>
e.g. states a couple of lines down in the Motivation section<br>
"for each of the standard
containers there is a pointer container equivalent that takes
ownership of
the objects in an exception safe manner"<br>
<br>
Still that wasn't clear enough for me so I wrote a small test
program and tested it. ( I didn't even find a description of what
clear() does e.g. that it removes and deletes the elements )<br>
<br>
Noel<br>
</body>
</html>