Use LeakChecked throughout Beast

This commit is contained in:
Vinnie Falco
2013-06-29 22:59:07 -07:00
parent 386fea5e71
commit ca1eda2df1
104 changed files with 354 additions and 650 deletions

View File

@@ -24,7 +24,12 @@
@ingroup beast_concurrent
*/
#if 0//BEAST_BOOST_IS_AVAILABLE
// VFALCO NOTE Disabled this because it seems that the TLS
// implementation has a leak. Although the other
// one also seems to have a leak.
//
//#if BEAST_BOOST_IS_AVAILABLE
#if 0
typedef FifoFreeStoreWithTLS FifoFreeStoreType;
#else
typedef FifoFreeStoreWithoutTLS FifoFreeStoreType;

View File

@@ -20,24 +20,28 @@
#ifndef BEAST_REFERENCECOUNTEDSINGLETON_BEASTHEADER
#define BEAST_REFERENCECOUNTEDSINGLETON_BEASTHEADER
/**
Thread-safe singleton which comes into existence on first use. Use this
instead of creating objects with static storage duration. These singletons
are automatically reference counted, so if you hold a pointer to it in every
object that depends on it, the order of destruction of objects is assured
to be correct.
/** Thread-safe singleton which comes into existence on first use. Use this
instead of creating objects with static storage duration. These singletons
are automatically reference counted, so if you hold a pointer to it in every
object that depends on it, the order of destruction of objects is assured
to be correct.
class Object must provide the function `Object* Object::createInstance()`
class Object must provide the function `Object* Object::createInstance()`
@class RefCountedSingleton
@ingroup beast_core
@class RefCountedSingleton
@ingroup beast_core
*/
/** @{ */
class BEAST_API SingletonLifetime
{
// "base classes dependent on a template parameter
// aren't part of lookup." - ville
public:
// It would be nice if we didn't have to qualify the enumeration but
// Argument Dependent Lookup is inapplicable here because:
//
// "Base classes dependent on a template parameter aren't part of lookup."
// - ville
//
/** Construction options for RefCountedSingleton
@ingroup beast_core
@@ -59,6 +63,8 @@ public:
};
};
//------------------------------------------------------------------------------
template <class Object>
class RefCountedSingleton
: public SingletonLifetime