From 62b06fa427b4f432f82510f51e4b6920280b17a8 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 14 Dec 2016 22:38:37 +0100 Subject: Add a trash pool for invalidation requests. While EventLoop::invalidate_request() does invalidate request in the request-list. It does *not* invalidate requests in the per-thread-request-ringbuffer(s). The invalidation record cannot be deleted in EventLoop::invalidate_request see 6b5891a78f. --- libs/pbd/event_loop.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libs/pbd/event_loop.cc') diff --git a/libs/pbd/event_loop.cc b/libs/pbd/event_loop.cc index 0baba2835a..aae0c21a08 100644 --- a/libs/pbd/event_loop.cc +++ b/libs/pbd/event_loop.cc @@ -95,8 +95,9 @@ EventLoop::invalidate_request (void* data) (*i)->invalidation = 0; } } - // should this not always be deleted, regardless if there's an event_loop? - delete ir; + // This invalidation record may still be in-use in per-thread-request-ringbuffer. + // it cannot be deleted here, + ir->event_loop->trash.push_back(ir); } else { DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("EventLoop::invalidate_request no event-loop for invalidation %1\n", ir)); } -- cgit v1.2.3