mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-14 15:05:34 +02:00
Removed experimental ValueAllocator, it caused static initialization/destruction order issues (bug #2934500). The DefaultValueAllocator has been inlined in code.
This commit is contained in:
@@ -26,7 +26,6 @@ namespace Json {
|
||||
class ValueIterator;
|
||||
class ValueConstIterator;
|
||||
#ifdef JSON_VALUE_USE_INTERNAL_MAP
|
||||
class ValueAllocator;
|
||||
class ValueMapAllocator;
|
||||
class ValueInternalLink;
|
||||
class ValueInternalArray;
|
||||
|
@@ -513,26 +513,7 @@ namespace Json {
|
||||
Args args_;
|
||||
};
|
||||
|
||||
/** \brief Experimental do not use: Allocator to customize member name and string value memory management done by Value.
|
||||
*
|
||||
* - makeMemberName() and releaseMemberName() are called to respectively duplicate and
|
||||
* free an Json::objectValue member name.
|
||||
* - duplicateStringValue() and releaseStringValue() are called similarly to
|
||||
* duplicate and free a Json::stringValue value.
|
||||
*/
|
||||
class ValueAllocator
|
||||
{
|
||||
public:
|
||||
enum { unknown = (unsigned)-1 };
|
||||
|
||||
virtual ~ValueAllocator();
|
||||
|
||||
virtual char *makeMemberName( const char *memberName ) = 0;
|
||||
virtual void releaseMemberName( char *memberName ) = 0;
|
||||
virtual char *duplicateStringValue( const char *value,
|
||||
unsigned int length = unknown ) = 0;
|
||||
virtual void releaseStringValue( char *value ) = 0;
|
||||
};
|
||||
|
||||
#ifdef JSON_VALUE_USE_INTERNAL_MAP
|
||||
/** \brief Allocator to customize Value internal map.
|
||||
|
Reference in New Issue
Block a user