3 //==========================================================================
8 * @author Irfan Pyarali.
10 //==========================================================================
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/ACE_export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 * @brief Checks to see if an object was dynamically allocated.
29 * This class holds the pointer in a thread-safe manner between
30 * the call to operator new and the call to the constructor.
32 class ACE_Export ACE_Dynamic
42 * Sets a flag that indicates that the object was dynamically
43 * created. This method is usually called in operator new and then
44 * checked and reset in the constructor.
48 /// @c true if we were allocated dynamically, else @c false.
51 /// Resets state flag.
54 static ACE_Dynamic
*instance ();
56 ACE_ALLOC_HOOK_DECLARE
;
60 * Flag that indicates that the object was dynamically created. This
61 * method is usually called in operator new and then checked and
62 * reset in the constructor.
67 ACE_END_VERSIONED_NAMESPACE_DECL
69 #if defined (__ACE_INLINE__)
70 #include "ace/Dynamic.inl"
71 #endif /* __ACE_INLINE__ */
73 #include /**/ "ace/post.h"
74 #endif /* ACE_DYNAMIC_H */