diff options
author | Robin Gareus <robin@gareus.org> | 2016-12-14 22:38:37 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-12-14 22:39:25 +0100 |
commit | 62b06fa427b4f432f82510f51e4b6920280b17a8 (patch) | |
tree | d3e5bd9e92a4b0492c6307a8c317fc6dd20580bb /libs/pbd/event_loop.cc | |
parent | 07bcdc7f0a5b2702eff92716ab42228c6977ce94 (diff) |
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.
Diffstat (limited to 'libs/pbd/event_loop.cc')
-rw-r--r-- | libs/pbd/event_loop.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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)); } |