@@ -295,6 +295,8 @@ UbuntuShape {
295295
296296 width: MathUtils.clamp(implicitWidth, d.__minimumWidth, d.__maximumWidth)
297297
298+ property Item popup: null
299+
298300 action.onTriggered: {
299301 submenuHoverTimer.stop();
300302
@@ -346,6 +348,13 @@ UbuntuShape {
346348 }
347349 }
348350 }
351+
352+ Component.onDestruction: {
353+ if (popup) {
354+ popup.destroy();
355+ popup = null;
356+ }
357+ }
349358 }
350359 }
351360
@@ -362,7 +371,7 @@ UbuntuShape {
362371 id: loader
363372 objectName: root.objectName + "-item" + __ownIndex
364373
365− property Item popup: null
374+ readonly property var popup: item ? item.popup : null
366375 property var __menuData: model
367376 property int __ownIndex: index
368377 property bool __isSeparator: model.isSeparator