Raised This Month: $ Target: $400
 0% 

menu_destroy doesn't clear the variable?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Elusive138
Senior Member
Join Date: Dec 2010
Old 09-30-2011 , 03:53   menu_destroy doesn't clear the variable?
Reply With Quote #1

PHP Code:
new menu menu_create(titlehandler// menu == new menu id
menu_destroy(menu// menu == old, invalid menu id 
Is there any particular reason menu_destroy doesn't set the variable to 0, like ArrayDestroy does?

For now I'm using this, is there a better method or another way I should be doing things?
PHP Code:
menu_safedestroy(&menuid) {
    if (
menuid)
        
menu_destroy(menuid);
    
menuid 0;


Last edited by Elusive138; 09-30-2011 at 03:57.
Elusive138 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode