mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-03 17:35:51 +00:00
Use LeakChecked throughout Beast
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user