summaryrefslogtreecommitdiff
path: root/ace/Free_List.cpp
diff options
context:
space:
mode:
authornw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-07-13 05:13:22 +0000
committernw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-07-13 05:13:22 +0000
commit98a1a1c8af41319e3141e9668d9b0097cefd34fd (patch)
tree3af99af9cadfe27abf5057382bdfcce5228ecfe6 /ace/Free_List.cpp
parent63e99a0f37d40cf72fbc6e0123e0489f8d6cf790 (diff)
downloadATCD-98a1a1c8af41319e3141e9668d9b0097cefd34fd.tar.gz
Removed ACE_Locked_Simple_Free_List
Diffstat (limited to 'ace/Free_List.cpp')
-rw-r--r--ace/Free_List.cpp31
1 files changed, 11 insertions, 20 deletions
diff --git a/ace/Free_List.cpp b/ace/Free_List.cpp
index 8d8f4d7d9f7..a942ba204be 100644
--- a/ace/Free_List.cpp
+++ b/ace/Free_List.cpp
@@ -15,29 +15,19 @@ ACE_Free_List<T>::~ACE_Free_List (void)
// Nothing
}
-template <class T, class LOCK>
-ACE_Locked_Simple_Free_List<T, LOCK>::ACE_Locked_Simple_Free_List (void)
- : size_ (0),
- head_ (0)
-{
-}
-
-template <class T, class LOCK>
-ACE_Locked_Simple_Free_List<T, LOCK>::~ACE_Locked_Simple_Free_List (void)
-{
-}
-
// Default constructor that takes in a preallocation number
// (<prealloc>), a low and high water mark (<lwm> and <hwm>) and an
// increment value (<inc>)
template <class T, class LOCK>
-ACE_Locked_Free_List<T, LOCK>::ACE_Locked_Free_List (size_t prealloc,
+ACE_Locked_Free_List<T, LOCK>::ACE_Locked_Free_List (ACE_Free_List_Op_Mode mode,
+ size_t prealloc,
size_t lwm,
size_t hwm,
size_t inc,
LOCK *mutex)
- : free_list_ (NULL),
+ : mode_ (mode),
+ free_list_ (NULL),
lwm_ (lwm),
hwm_ (hwm),
inc_ (inc),
@@ -53,12 +43,13 @@ ACE_Locked_Free_List<T, LOCK>::ACE_Locked_Free_List (size_t prealloc,
template <class T, class LOCK>
ACE_Locked_Free_List<T, LOCK>::~ACE_Locked_Free_List (void)
{
- while (this->free_list_ != NULL)
- {
- T *temp = this->free_list_;
- this->free_list_ = this->free_list_->get_next ();
- delete temp;
- }
+ if (this->mode_ != ACE_PURE_FREE_LIST)
+ while (this->free_list_ != NULL)
+ {
+ T *temp = this->free_list_;
+ this->free_list_ = this->free_list_->get_next ();
+ delete temp;
+ }
if (this->delete_mutex_)
delete this->mutex_;