--- parser3/src/main/pa_cache_managers.C 2003/01/21 15:51:13 1.7 +++ parser3/src/main/pa_cache_managers.C 2003/01/27 15:45:00 1.7.2.1 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_CACHE_MANAGERS_C="$Date: 2003/01/21 15:51:13 $"; +static const char* IDENT_CACHE_MANAGERS_C="$Date: 2003/01/27 15:45:00 $"; #include "pa_cache_managers.h" @@ -15,18 +15,10 @@ Cache_managers *cache_managers; // methods -static void destroy_one(const Hash::Key& akey, Hash::Val *avalue, - void *) { - static_cast(avalue)->~Cache_manager(); -} -Cache_managers::~Cache_managers() { - for_each(destroy_one); -} - -static void maybe_expire_one(const Hash::Key& akey, Hash::Val *avalue, - void *) { - static_cast(avalue)->maybe_expire_cache(); +static void maybe_expire_one(Cache_managers::key_type akey, Cache_managers::value_type avalue, + int) { + avalue->maybe_expire_cache(); } void Cache_managers::maybe_expire() { - for_each(maybe_expire_one); + for_each(maybe_expire_one, 0); }