<?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[Destruktor auch bei beendigung?]]></title><description><![CDATA[<p>Hallo,<br />
wird der Konstruktor auch bei beendigung eines Programms (also zB. bei Linux zur Strg+C oder durch klicken auf das Schliesen-&quot;X&quot;) aufgerufen?<br />
mfg Kante</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/137365/destruktor-auch-bei-beendigung</link><generator>RSS for Node</generator><lastBuildDate>Sat, 29 Aug 2026 17:48:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/137365.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Feb 2006 21:10:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Destruktor auch bei beendigung? on Thu, 16 Feb 2006 21:10:32 GMT]]></title><description><![CDATA[<p>Hallo,<br />
wird der Konstruktor auch bei beendigung eines Programms (also zB. bei Linux zur Strg+C oder durch klicken auf das Schliesen-&quot;X&quot;) aufgerufen?<br />
mfg Kante</p>
]]></description><link>https://www.c-plusplus.net/forum/post/996251</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/996251</guid><dc:creator><![CDATA[Kante23]]></dc:creator><pubDate>Thu, 16 Feb 2006 21:10:32 GMT</pubDate></item><item><title><![CDATA[Reply to Destruktor auch bei beendigung? on Thu, 16 Feb 2006 21:51:07 GMT]]></title><description><![CDATA[<p>Probier es doch einfach aus? <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="😉"
    /> EInfach in einen Distruktor eine Datei schreiben oder eine Textausgabe in die Konsole machen (bei X-Klick schlecht, aber bei strg+C schon eher)</p>
<p>Normalerweise werden die Destruktoren nur aufgerufen, wenn das Programm die main() verlässt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/996281</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/996281</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Thu, 16 Feb 2006 21:51:07 GMT</pubDate></item><item><title><![CDATA[Reply to Destruktor auch bei beendigung? on Fri, 17 Feb 2006 07:18:31 GMT]]></title><description><![CDATA[<p>Die Destruktoren werden immer aufgerufen, wenn das Programm (bzw. der umgebende Wirkungsbereich) <strong>regulär</strong> beendet wird - d.h. bei einem return aus der main() oder einem exit()-Aufruf. Wenn du das Programm von außen &quot;killst&quot;, wird es sofort abgebrochen und hat keine Zeit mehr für irgendwelche Aufräumarbeiten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/996364</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/996364</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 17 Feb 2006 07:18:31 GMT</pubDate></item><item><title><![CDATA[Reply to Destruktor auch bei beendigung? on Fri, 17 Feb 2006 08:45:31 GMT]]></title><description><![CDATA[<p>Wobei exit nicht die Desktruktoren von automatischen Objekten im aktuellen Block aufruft. Statische Objekte werden aber abgeräumt. Bei Ctrl+C bekommt zumindest unter UNIX ein Programm ein Signal (SIGINTR?) und muss halt entsprechend darauf reagieren. Tut es das nicht, kommt das seiner sofortigen Beendigung mit abort() gleich.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/996429</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/996429</guid><dc:creator><![CDATA[7H3 N4C3R]]></dc:creator><pubDate>Fri, 17 Feb 2006 08:45:31 GMT</pubDate></item></channel></rss>