Menu.Release
------------

Releases the menu.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Menu](component_Menu.md) | [4.1](newinversion41.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Menu.Release"; menu { ; children } ) 

**MBS**( **"Menu.Release";** /\* Releases the menu. \*/  
**$menu**; /\* The reference to the menu. Please create one with [Menu.CreateMenu](MenuCreateMenu.md). \*/   
**$children**) /\* Optional; If 1, releases all child menu items and child menus.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| menu | The reference to the menu. Please create one with [Menu.CreateMenu](MenuCreateMenu.md). | $menu |  |
| children | If 1, releases all child menu items and child menus. | 0 | Optional |

### Result

Returns OK or error.

### Description

Releases the menu.  
You need to release menus after you finished using it to avoid running out of memory.  
### See also

- [Menu.AddItem](MenuAddItem.md)
- [Menu.AddItems](MenuAddItems.md)
- [Menu.CreateMenu](MenuCreateMenu.md)
- [Menu.DefineQuickMenu](MenuDefineQuickMenu.md)
- [Menu.PopUp](MenuPopUp.md)
- [Menu.ReleaseAll](MenuReleaseAll.md)
- [Menu.SelectedItem](MenuSelectedItem.md)
- [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md)
- [MenuItem.GetTag](MenuItemGetTag.md)
- [MenuItem.ReleaseAll](MenuItemReleaseAll.md)

### Example Databases

- [Menu/DefineQuickMenu with XML](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Menu/DefineQuickMenu%20with%20XML.shtml#1ScriptAnchor_)
- [Menu/DefineQuickMenu](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Menu/DefineQuickMenu.shtml#1ScriptAnchor_)
- [Menu/Popup Menu](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Menu/Popup%20Menu.shtml#1ScriptAnchor_)

### Blog Entries

- [Tip of the day: Build contextual menu in FileMaker from a table](https://www.mbsplugins.de/archive/2015-09-11/Tip_of_the_day_Build_contextua/monkeybreadsoftware_blog_filemaker)
- [QuickMenu function](https://www.mbsplugins.de/archive/2014-12-01/QuickMenu_function/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 2/2021, Seite 30](https://filemaker-magazin.de/neuigkeit/4132-Appetithappen-FMM_202102)

This function checks for a license.

Created 18th August 2014 , last changed 31st August 2014

  
[Menu.PopUp](MenuPopUp.md) - [Menu.ReleaseAll](MenuReleaseAll.md)

[HTML Version](MenuRelease.shtml)