1 #ifndef ACE_CLEANUP_STRATEGIES_T_CPP
2 #define ACE_CLEANUP_STRATEGIES_T_CPP
4 #include "ace/Cleanup_Strategies_T.h"
6 #if !defined (ACE_LACKS_PRAGMA_ONCE)
8 #endif /* ACE_LACKS_PRAGMA_ONCE */
10 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
12 ////////////////////////////////////////////////////////////////////////////
14 template <class KEY
, class VALUE
, class CONTAINER
>
15 ACE_Cleanup_Strategy
<KEY
, VALUE
, CONTAINER
>::~ACE_Cleanup_Strategy (void)
19 template <class KEY
, class VALUE
, class CONTAINER
> int
20 ACE_Cleanup_Strategy
<KEY
, VALUE
, CONTAINER
>::cleanup (CONTAINER
&container
,
24 return container
.unbind (*key
);
27 ////////////////////////////////////////////////////////////////////////////
29 template <class KEY
, class VALUE
, class CONTAINER
> int
30 ACE_Recyclable_Handler_Cleanup_Strategy
<KEY
, VALUE
, CONTAINER
>::cleanup (
37 if (container
.unbind (*key
, value
) == -1)
40 value
.first
->recycler (0, 0);
42 value
.first
->close ();
47 /////////////////////////////////////////////////////////////////////////////
49 template <class KEY
, class VALUE
, class CONTAINER
> int
50 ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy
<KEY
,
57 return value
->first ()->handle_close_i ();
60 ////////////////////////////////////////////////////////////////////////////
62 template <class KEY
, class VALUE
, class CONTAINER
> int
63 ACE_Handler_Cleanup_Strategy
<KEY
, VALUE
, CONTAINER
>::cleanup (
68 // Remove the item from cache only if the handler isnt in use.
69 if ((*value
)->active () == 0)
73 if (container
.unbind (*key
) == -1)
81 ////////////////////////////////////////////////////////////////////////////
83 template <class KEY
, class VALUE
, class CONTAINER
> int
84 ACE_Null_Cleanup_Strategy
<KEY
, VALUE
, CONTAINER
>::cleanup (CONTAINER
&,
91 ACE_END_VERSIONED_NAMESPACE_DECL
93 #endif /* ACE_CLEANUP_STRATEGIES_T_CPP */