<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[STL container erase und delete?]]></title><description><![CDATA[<p>Gibt es keine andere möglichkeit um das problem mit der Speicherfreigabe (erase), bei</p>
<pre><code class="language-cpp">std::list&lt;foo*&gt; LIST.

LIST.push_bach(new foo());
.
.
.
.

LIST.erase(...);
</code></pre>
<p>zu ermöglichen ohne nen smart poiner zu verwenden bzw. es manuel mit delete zulöschen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/192329/stl-container-erase-und-delete</link><generator>RSS for Node</generator><lastBuildDate>Sun, 27 Sep 2026 10:14:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/192329.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Sep 2007 05:10:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to STL container erase und delete? on Thu, 13 Sep 2007 05:10:40 GMT]]></title><description><![CDATA[<p>Gibt es keine andere möglichkeit um das problem mit der Speicherfreigabe (erase), bei</p>
<pre><code class="language-cpp">std::list&lt;foo*&gt; LIST.

LIST.push_bach(new foo());
.
.
.
.

LIST.erase(...);
</code></pre>
<p>zu ermöglichen ohne nen smart poiner zu verwenden bzw. es manuel mit delete zulöschen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364376</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364376</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Thu, 13 Sep 2007 05:10:40 GMT</pubDate></item><item><title><![CDATA[Reply to STL container erase und delete? on Thu, 13 Sep 2007 05:33:52 GMT]]></title><description><![CDATA[<p>Hi,<br />
smart Pointer oder kein foo* sondern foo benutzen. Ne andere Möglichkeit sehe ich nicht ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364386</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364386</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 13 Sep 2007 05:33:52 GMT</pubDate></item><item><title><![CDATA[Reply to STL container erase und delete? on Thu, 13 Sep 2007 05:35:44 GMT]]></title><description><![CDATA[<p>hmm schade, dachte die erase funktion könnte das objekt selber löschen, aber das ist ja auch nicht unbeding das wahre aller dinge</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364388</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Thu, 13 Sep 2007 05:35:44 GMT</pubDate></item><item><title><![CDATA[Reply to STL container erase und delete? on Thu, 13 Sep 2007 05:42:38 GMT]]></title><description><![CDATA[<p>Wenn es darum geht alles irgendwie schön zu verpacken, dann schreib dir ein Funktionsobjekt Deleter() und gib es mit der list an for_each().</p>
<p>Zudem ändert sich doch bei der Benutzung eines smart Pointers nur die Definition der List, alles andere bleibt gleich, oder was ist der Grund, dass du auf smart Pointer verzichten willst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364390</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364390</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 13 Sep 2007 05:42:38 GMT</pubDate></item><item><title><![CDATA[Reply to STL container erase und delete? on Thu, 13 Sep 2007 05:54:29 GMT]]></title><description><![CDATA[<p>ne will nicht auf smart pointer verzichten.. hab mich aber noch nicht mit boost auseinder gestetzt bzw. installiert.. die std::auto_ptr kann man ja vergessen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364393</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364393</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Thu, 13 Sep 2007 05:54:29 GMT</pubDate></item><item><title><![CDATA[Reply to STL container erase und delete? on Thu, 13 Sep 2007 06:03:15 GMT]]></title><description><![CDATA[<p><a href="http://bl4ckd0g.bl.funpic.de/docs/Smartpointer.pdf" rel="nofollow">http://bl4ckd0g.bl.funpic.de/docs/Smartpointer.pdf</a><br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-134971.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-134971.html</a><br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Bissl Zeit opfern und lesen ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364399</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364399</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 13 Sep 2007 06:03:15 GMT</pubDate></item><item><title><![CDATA[Reply to STL container erase und delete? on Thu, 13 Sep 2007 07:08:33 GMT]]></title><description><![CDATA[<p>danke KasF <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> wie smartpointer funktionieren weis ich ja .. hab aber boost noch net eingebunden;)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364417</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364417</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Thu, 13 Sep 2007 07:08:33 GMT</pubDate></item><item><title><![CDATA[Reply to STL container erase und delete? on Thu, 13 Sep 2007 07:31:13 GMT]]></title><description><![CDATA[<p>das geht recht schmerzfrei. einfach mal ausprobieren, du musst dir auch nicht die mühe machen die lib zu bauen, da die smart pointer nur templates sind.<br />
in deinem fall wäre wohl der shared_ptr der richtige.<br />
<a href="http://www.boost.org/libs/smart_ptr/smart_ptr.htm" rel="nofollow">http://www.boost.org/libs/smart_ptr/smart_ptr.htm</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364428</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364428</guid><dc:creator><![CDATA[ghorst]]></dc:creator><pubDate>Thu, 13 Sep 2007 07:31:13 GMT</pubDate></item></channel></rss>