How do I release a MIDI device from an Editor Utility Widget?

I am trying to make an Editor Utility Widget that allows me to manage MIDI connections and mappings for UI control from a MIDI hardware controller (sliders and knobs, etc).

I’ve got the part figured out where I create a MIDI Device Controller and bind or unbind an Event to “On MIDIControlChange”, but after unBinding all events, how do I then Delete or de-reference or nullify or invalidate the original MIDI Device Controller that I created?

I’ve tried everything from trying to set the MIDIDevice Controller Object (variable created from “Creat MIDIDevice Controller”) to null or create a device with ID zero or even just set it to a different ID that does exist.

Regardless, UE doesn’t seem to release the MIDI port until I close the widget, open it’s blueprint and re-compile it.

This is especially weird because when I did the same thing in just a plain actor instead of an Editor Utility Widget, it would garbage collect and release the MIDI port if I didn’t set the Device Controller to a variable, whereas in the Widget, it stays un-garbaged no matter what I do to it.

Put a Collect Garbage node at the end of the chain where you are catching the midi devices.

Did you ever find a solution for this?
I’m experiencing the same thing at runtime with variables set. I’m unable to disconnect or close a MIDI device.