47 , pool_gc_queue_(ops.gc_queue_size)
48 , period_(ops.gc_period.toSec())
61 getGC()->
add(pool, deleter, deletable);
75 typedef std::vector<PoolGCItem> V_PoolGCItem;
76 V_PoolGCItem gc_items;
86 gc_items.push_back(it->
val);
94 for (
size_t i = 0; i < gc_items.size();)
100 item = gc_items.back();
113 V_PoolGCItem::iterator it = gc_items.begin();
114 V_PoolGCItem::iterator end = gc_items.end();
115 for (; it != end; ++it)
120 ROS_WARN(
"Pool %p still has allocated blocks. Deleting anyway.", item.
pool);
boost::thread pool_gc_thread_
MWSRQueue< PoolGCItem > pool_gc_queue_
void(* DeleteFunc)(void *pool)
void add(void *pool, DeleteFunc deleter, IsDeletableFunc deletable)
IsDeletableFunc is_deletable
bool(* IsDeletableFunc)(void *pool)
SimpleGC(const InitOptions &ops)
void addPoolToGC(void *pool, PoolDeleteFunc deleter, PoolDeletableFunc deletable)