Commit c2a5cc0f authored by Dan Melnic's avatar Dan Melnic Committed by Facebook GitHub Bot

Replace loop with clear_and_dispose()

Summary: Replace loop with clear_and_dispose()

Reviewed By: yfeldblum

Differential Revision: D22450280

fbshipit-source-id: cad040abd3f40e0fbb1f2ab27d06bf5174760c2c
parent 9b29fac9
......@@ -173,11 +173,7 @@ void IoUringBackend::cleanup() {
// free the entries
timerEntry_.reset();
signalReadEntry_.reset();
while (!freeList_.empty()) {
auto* ioCb = &freeList_.front();
freeList_.pop_front();
delete ioCb;
}
freeList_.clear_and_dispose([](auto _) { delete _; });
// exit now
::io_uring_queue_exit(&ioRing_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment