muda icon indicating copy to clipboard operation
muda copied to clipboard

show_context_menu_for_hwnd() requires self to last for the lifetime of the pop up

Open npwoods opened this issue 7 months ago • 1 comments

Menu::show_context_menu_for_hwnd() takes &self and returns immediately. If &self is dropped or moved, the act of selecting a menu item will result in a stray memory access.

Shouldn't this be changed to something safe (e.g. - taking Rc<Menu>) or be marked as unsafe? Though I suspect that anybody using muda and messing around with HWNDs is in any case "'going offroad'"

npwoods avatar Jul 07 '24 20:07 npwoods