MCPcopy Create free account
hub / github.com/davisking/dlib / deleter_thread

Method deleter_thread

dlib/gui_widgets/widgets.cpp:2710–2724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2708 // ------------------------------------------------------------------------------------
2709
2710 void box_win::
2711 deleter_thread (
2712 void* param
2713 )
2714 {
2715 // The point of this extra event_handler stuff is to allow the user
2716 // to end the program from within the callback. So we want to destroy the
2717 // window *before* we call their callback.
2718 box_win& w = *static_cast<box_win*>(param);
2719 w.close_window();
2720 any_function<void()> event_handler(w.event_handler);
2721 delete &w;
2722 if (event_handler.is_set())
2723 event_handler();
2724 }
2725
2726 // ------------------------------------------------------------------------------------
2727

Callers

nothing calls this directly

Calls 1

is_setMethod · 0.45

Tested by

no test coverage detected