<?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[map destructor]]></title><description><![CDATA[<p>Abend,</p>
<p>ich habe eine Klasse, die eine std::map beinhaltet, wobei die Map strings und Smartpointer speichert:</p>
<pre><code class="language-cpp">class Foo {
std::map&lt;std::string, ID3D10EffectPtr&gt; effects;
};
</code></pre>
<p>Muss ich da jetzt irgendwas spezielles im Foo Destructor schreiben? Oder wird beim Zerstören von Foo automatisch der map Dtor aufgerufen und dann wiederrum alle ID3D10EffectPtr Dtor?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/248443/map-destructor</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 00:36:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/248443.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Aug 2009 23:40:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to map destructor on Mon, 24 Aug 2009 23:40:55 GMT]]></title><description><![CDATA[<p>Abend,</p>
<p>ich habe eine Klasse, die eine std::map beinhaltet, wobei die Map strings und Smartpointer speichert:</p>
<pre><code class="language-cpp">class Foo {
std::map&lt;std::string, ID3D10EffectPtr&gt; effects;
};
</code></pre>
<p>Muss ich da jetzt irgendwas spezielles im Foo Destructor schreiben? Oder wird beim Zerstören von Foo automatisch der map Dtor aufgerufen und dann wiederrum alle ID3D10EffectPtr Dtor?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1766136</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766136</guid><dc:creator><![CDATA[mappla]]></dc:creator><pubDate>Mon, 24 Aug 2009 23:40:55 GMT</pubDate></item><item><title><![CDATA[Reply to map destructor on Mon, 24 Aug 2009 23:43:51 GMT]]></title><description><![CDATA[<p>mappla schrieb:</p>
<blockquote>
<p>Oder wird beim Zerstören von Foo automatisch der map Dtor aufgerufen und dann wiederrum alle ID3D10EffectPtr Dtor?</p>
</blockquote>
<p>Exakt. Sofern dein Smart-Pointer richtig aufräumt, hast du nichts zu befürchten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1766138</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766138</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Mon, 24 Aug 2009 23:43:51 GMT</pubDate></item><item><title><![CDATA[Reply to map destructor on Tue, 25 Aug 2009 05:04:12 GMT]]></title><description><![CDATA[<p>Nexus schrieb:</p>
<blockquote>
<p>mappla schrieb:</p>
<blockquote>
<p>Oder wird beim Zerstören von Foo automatisch der map Dtor aufgerufen und dann wiederrum alle ID3D10EffectPtr Dtor?</p>
</blockquote>
<p>Exakt. Sofern dein Smart-Pointer richtig aufräumt, hast du nichts zu befürchten.</p>
</blockquote>
<p>Wenn es ein Smartpointer ist, also wenn es sich um eine Kllasse handelt. Wenn ID3D10EffectPtr einfach nur ein typedef auf einen Pointer ist, dann wird der pointer einfach gelöscht. Es wird NICHT automatisch delete aufgerufen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1766153</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766153</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Tue, 25 Aug 2009 05:04:12 GMT</pubDate></item></channel></rss>