13
0

Reap invalidation records

This commit is contained in:
Robin Gareus 2017-01-20 13:46:11 +01:00
parent fbae5f5ffd
commit 8f8d0a70d8
2 changed files with 13 additions and 1 deletions

View File

@ -45,6 +45,18 @@ EventLoop::EventLoop (string const& name)
{
}
EventLoop::~EventLoop ()
{
trash.sort();
trash.unique();
for (std::list<InvalidationRecord*>::iterator r = trash.begin(); r != trash.end(); ++r) {
if (!(*r)->in_use ()) {
delete *r;
}
}
trash.clear ();
}
EventLoop*
EventLoop::get_event_loop_for_thread()
{

View File

@ -47,7 +47,7 @@ class LIBPBD_API EventLoop
{
public:
EventLoop (std::string const&);
virtual ~EventLoop() {}
virtual ~EventLoop();
enum RequestType {
range_guarantee = ~0