Release the menu bar's native resources: drop every item from the command
registry and destroy the bar's HMENU (which frees its menus' handles too).
Call this only when the bar is no longer attached to a live window — a menu
assigned to a window is destroyed automatically when the window is destroyed,
so disposing it again would be a double free. Use it when you build a bar you
never attach, or replace a window's menu bar at runtime. Idempotent.
Release the menu bar's native resources: drop every item from the command registry and destroy the bar's HMENU (which frees its menus' handles too).
Call this only when the bar is no longer attached to a live window — a menu assigned to a window is destroyed automatically when the window is destroyed, so disposing it again would be a double free. Use it when you build a bar you never attach, or replace a window's menu bar at runtime. Idempotent.