--- parser3/src/main/pa_cache_managers.C 2001/12/13 11:09:46 1.2 +++ parser3/src/main/pa_cache_managers.C 2003/11/20 15:35:31 1.9 @@ -1,32 +1,24 @@ /** @file Parser: status press center implementation. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://paf.design.ru) - - $Id: pa_cache_managers.C,v 1.2 2001/12/13 11:09:46 paf Exp $ + Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ +static const char* IDENT_CACHE_MANAGERS_C="$Date: 2003/11/20 15:35:31 $"; + #include "pa_cache_managers.h" // globals -Cache_managers *cache_managers; +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); }