Object creation and destruction
[Memory management]

Collaboration diagram for Object creation and destruction:

Replacements for operators new and delete. Constructors can handle up to 10 arguments of arbitary types. More...

Data Structures

class  LDK::Allocator< T >
 An (almost) standard compiliant, threadsafe STL allocator with an MSVC extension. More...
class  LDK::MallocAllocator< T >
 An (almost) standard compiliant, threadsafe STL allocator with an MSVC extension. More...

Defines

#define LDK_CREATE0(Type)   LDK::create<Type >(__FILE__,__LINE__)
 create an object that takes no constructor arguments
#define LDK_CREATE1(Type, c1)   LDK::create<Type >(__FILE__,__LINE__,c1)
 create an object that takes 1 constructor argument
#define LDK_CREATE2(Type, c1, c2)   LDK::create<Type >(__FILE__,__LINE__,c1,c2)
 create an object that takes 2 constructor arguments
#define LDK_CREATE3(Type, c1, c2, c3)   LDK::create<Type >(__FILE__,__LINE__,c1,c2,c3)
 create an object that takes 3 constructor arguments
#define LDK_CREATE4(Type, c1, c2, c3, c4)   LDK::create<Type >(__FILE__,__LINE__,c1,c2,c3,c4)
 create an object that takes 4 constructor arguments
#define LDK_CREATE5(Type, c1, c2, c3, c4, c5)   LDK::create<Type >(__FILE__,__LINE__,c1,c2,c3,c4,c5)
 create an object that takes 5 constructor arguments
#define LDK_CREATE6(Type, c1, c2, c3, c4, c5, c6)
 create an object that takes 6 constructor arguments
#define LDK_CREATE7(Type, c1, c2, c3, c4, c5, c6, c7)
 create an object that takes 7 constructor arguments
#define LDK_CREATE8(Type, c1, c2, c3, c4, c5, c6, c7, c8)
 create an object that takes 8 constructor arguments
#define LDK_CREATE9(Type, c1, c2, c3, c4, c5, c6, c7, c8, c9)
 create an object that takes 9 constructor arguments
#define LDK_CREATE10(Type, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10)
 create an object that takes 10 constructor arguments
#define LDK_ALLOCATORS
 Macro that expands to per-class replacement allocation operators that use the LDK system.

Functions

template<class T>
void LDK::destroy (const T *o)
 Calls an object's destructor and frees the memory.

Detailed Description

Notes:

WARNING: The only thread that may destroy an object is the thread that created it. This condition is asserted.


Define Documentation

#define LDK_ALLOCATORS

Value:

inline void* operator new(size_t size)\
{\
    return LDK::alloc(size);\
}\
inline void operator delete(void* mem)\
{\
    LDK::dealloc(mem);\
}\
inline void* operator new[](size_t size)\
{\
    return LDK::alloc(size);\
}\
inline void operator delete[](void* mem)\
{\
    LDK::dealloc(mem);\
}

Definition at line 1250 of file Memory.h.

#define LDK_CREATE0 ( Type   )     LDK::create<Type >(__FILE__,__LINE__)

Exceptions:
BadAlloc in an out of memory condition.

Definition at line 858 of file Memory.h.

Referenced by LDK::StlContainerPtrBinding< T, VecT >::fromXml(), LDK::GetXmlBinding(), LDK::Member(), LDK::MemberAttribute(), and LDK::MemberPeer().

#define LDK_CREATE1 ( Type,
c1   )     LDK::create<Type >(__FILE__,__LINE__,c1)

Exceptions:
BadAlloc in an out of memory condition.

Definition at line 890 of file Memory.h.

Referenced by LDK::GetXmlBinding(), LDK::NewSmartPointer< T >::NewSmartPointer(), LDK::RawSmartPointer< T >::RawSmartPointer(), and LDK::SmartPointer< T >::SmartPointer().

#define LDK_CREATE10 ( Type,
c1,
c2,
c3,
c4,
c5,
c6,
c7,
c8,
c9,
c10   ) 

Value:

LDK::create<Type >(__FILE__,__LINE__,\
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10)
Exceptions:
BadAlloc in an out of memory condition.

Definition at line 1224 of file Memory.h.

#define LDK_CREATE2 ( Type,
c1,
c2   )     LDK::create<Type >(__FILE__,__LINE__,c1,c2)

Exceptions:
BadAlloc in an out of memory condition.

Definition at line 923 of file Memory.h.

#define LDK_CREATE3 ( Type,
c1,
c2,
c3   )     LDK::create<Type >(__FILE__,__LINE__,c1,c2,c3)

Exceptions:
BadAlloc in an out of memory condition.

Definition at line 957 of file Memory.h.

#define LDK_CREATE4 ( Type,
c1,
c2,
c3,
c4   )     LDK::create<Type >(__FILE__,__LINE__,c1,c2,c3,c4)

Exceptions:
BadAlloc in an out of memory condition.

Definition at line 992 of file Memory.h.

#define LDK_CREATE5 ( Type,
c1,
c2,
c3,
c4,
c5   )     LDK::create<Type >(__FILE__,__LINE__,c1,c2,c3,c4,c5)

Exceptions:
BadAlloc in an out of memory condition.

Definition at line 1028 of file Memory.h.

#define LDK_CREATE6 ( Type,
c1,
c2,
c3,
c4,
c5,
c6   ) 

Value:

LDK::create<Type >(__FILE__,__LINE__,\
c1,c2,c3,c4,c5,c6)
Exceptions:
BadAlloc in an out of memory condition.

Definition at line 1065 of file Memory.h.

#define LDK_CREATE7 ( Type,
c1,
c2,
c3,
c4,
c5,
c6,
c7   ) 

Value:

LDK::create<Type >(__FILE__,__LINE__,\
c1,c2,c3,c4,c5,c6,c7)
Exceptions:
BadAlloc in an out of memory condition.

Definition at line 1104 of file Memory.h.

#define LDK_CREATE8 ( Type,
c1,
c2,
c3,
c4,
c5,
c6,
c7,
c8   ) 

Value:

LDK::create<Type >(__FILE__,__LINE__,\
c1,c2,c3,c4,c5,c6,c7,c8)
Exceptions:
BadAlloc in an out of memory condition.

Definition at line 1143 of file Memory.h.

#define LDK_CREATE9 ( Type,
c1,
c2,
c3,
c4,
c5,
c6,
c7,
c8,
c9   ) 

Value:

LDK::create<Type >(__FILE__,__LINE__,\
c1,c2,c3,c4,c5,c6,c7,c8,c9)
Exceptions:
BadAlloc in an out of memory condition.

Definition at line 1183 of file Memory.h.


Generated on Fri Aug 17 18:32:27 2007 for LDK by  doxygen 1.5.1