<?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[singleton - multithreading]]></title><description><![CDATA[<p>Hi,</p>
<p>was passiert wenn ich folgenden code mit multithreading verwende?<br />
static erzeugt ein einziges object des Singletons.<br />
static Singleton instance; ... ruft den Konstruktor von Singleton auf?</p>
<pre><code>class Singleton {
public:
  static Singleton&amp; Instance() {
    static Singleton instance;
    return instance;
  }

  // Make Constructors, Assignment operator private/protected etc.
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/336046/singleton-multithreading</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 19:27:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/336046.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Dec 2015 11:13:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to singleton - multithreading on Wed, 30 Dec 2015 11:13:41 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>was passiert wenn ich folgenden code mit multithreading verwende?<br />
static erzeugt ein einziges object des Singletons.<br />
static Singleton instance; ... ruft den Konstruktor von Singleton auf?</p>
<pre><code>class Singleton {
public:
  static Singleton&amp; Instance() {
    static Singleton instance;
    return instance;
  }

  // Make Constructors, Assignment operator private/protected etc.
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2481117</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2481117</guid><dc:creator><![CDATA[mike1]]></dc:creator><pubDate>Wed, 30 Dec 2015 11:13:41 GMT</pubDate></item><item><title><![CDATA[Reply to singleton - multithreading on Wed, 30 Dec 2015 11:22:46 GMT]]></title><description><![CDATA[<p>In C++98 werden undefiniert viele Instanzen erstellt.<br />
In C++11 wird nur 1 Instanz erstellt.</p>
<p>Es kommt also auf den Compiler an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2481119</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2481119</guid><dc:creator><![CDATA[flow_]]></dc:creator><pubDate>Wed, 30 Dec 2015 11:22:46 GMT</pubDate></item><item><title><![CDATA[Reply to singleton - multithreading on Wed, 30 Dec 2015 11:24:56 GMT]]></title><description><![CDATA[<p>warum gibt es den unterschied? was macht der compiler wie?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2481120</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2481120</guid><dc:creator><![CDATA[mike1]]></dc:creator><pubDate>Wed, 30 Dec 2015 11:24:56 GMT</pubDate></item><item><title><![CDATA[Reply to singleton - multithreading on Wed, 30 Dec 2015 11:37:59 GMT]]></title><description><![CDATA[<p>In C++98/03 gibt es keine Threads. Sollte ein Compiler dennoch Threads implementieren, so geschieht dies außerhalb der C++ Spezifikation.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2481121</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2481121</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Wed, 30 Dec 2015 11:37:59 GMT</pubDate></item></channel></rss>