We've uncovered an issue when deferring events that hold shared pointers. The issue manifests when the event is on the back end of a defer queue deque and is erased. It turns out that the deque will move events on the queue backwards, and with the default move assignment operator, the move/dtor on the underlying data is not called properly.
The code below triggers the issue. The program prints
We've uncovered an issue when deferring events that hold shared pointers. The issue manifests when the event is on the back end of a defer queue deque and is erased. It turns out that the deque will move events on the queue backwards, and with the default move assignment operator, the move/dtor on the underlying data is not called properly.
The code below triggers the issue. The program prints