View Single Post
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 01-30-2013 , 16:34   New Menus Memory Leak Issue
Reply With Quote #1

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_clcmd("say /test""OnSayTest");
}

public 
OnSayTest(client)
{
    new 
menu menu_create("Test Menu""OnMenu");
    
    
menu_additem(menu"Item");
    
menu_display(clientmenu);
    
    return 
PLUGIN_HANDLED;
}

public 
OnMenu(clientmenuitem)
{
    
menu_destroy(menu);
    
    return 
PLUGIN_HANDLED;

say /testradio1/radio2/radio3/open any other menu → memory leak - Test Menu is never destroyed.

Any workarounds? Caching menus isn't really an option when using ML or when the menu consists of players. Is it worth filing as a bug report?
__________________
hleV is offline