Boost C++ Libraries: Ticket #847: [Test Library] How to init/free a singleton https://svn.boost.org/trac10/ticket/847 <pre class="wiki">Hi, Where is the good place to initialize / free a singleton in an unit test suite ? If a add my singleton GetInstante() in the beginning of init_unit_test_suite(), and my FreeInstance() in the end of the method, they are called before executing test cases. Do I have to add a first test case, which will get my singleton, and a final test case to free it, or is there another way to do it properly ? Thanks. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/847 Trac 1.4.3 Gennadiy Rozental Wed, 28 Feb 2007 15:36:21 GMT <link>https://svn.boost.org/trac10/ticket/847#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/847#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=331868 Originator: NO The good place to init/release singleton would be a global fixture: struct MyConfig { MyConfig() { // do init here } ~MyConfig() { // do release here } } BOOST_GLOBAL_FIXTURE( MyConfig ); </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>everguet</dc:creator> <pubDate>Thu, 01 Mar 2007 08:13:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/847#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/847#comment:2</guid> <description> <pre class="wiki">Logged In: YES user_id=383098 Originator: YES Where is it defined ? No trace of this macro in Boost v1.33.1. Thanks. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>everguet</dc:creator> <pubDate>Thu, 01 Mar 2007 08:14:52 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/847#comment:3 https://svn.boost.org/trac10/ticket/847#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket Gennadiy Rozental Thu, 01 Mar 2007 14:41:50 GMT <link>https://svn.boost.org/trac10/ticket/847#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/847#comment:4</guid> <description> <pre class="wiki">Logged In: YES user_id=331868 Originator: NO It's defined in 1.34.0 RC. 1.34.0 should be out soon </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Daryle Walker</dc:creator> <pubDate>Fri, 03 Aug 2007 12:24:07 GMT</pubDate> <title>component changed; severity set https://svn.boost.org/trac10/ticket/847#comment:5 https://svn.boost.org/trac10/ticket/847#comment:5 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">test</span> </li> <li><strong>severity</strong> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket Gennadiy Rozental Sat, 03 Nov 2007 00:39:30 GMT status, resolution changed https://svn.boost.org/trac10/ticket/847#comment:6 https://svn.boost.org/trac10/ticket/847#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">fixed</span> </li> </ul> <p> 1.34.0 is out. </p> Ticket