Raised This Month: $ Target: $400
 0% 

Dynamic Objects and Properties - v.0.0.32 - [2018.05.08]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 07-15-2016 , 23:41   Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
Reply With Quote #11

Hey, was wondering if I have to .Dispose when my plugin ends:

Code:
public void OnPluginStart()
{
    for(int i = 0; i < sizeof(gS_WeaponClasses); i++)
    {
        gD_Weapons[i] = Dynamic();
        gD_Weapons[i].SetString("weapon", gS_WeaponNames[i]);
        gD_Weapons[i].SetString("classname", gS_WeaponClasses[i]);
    }
}

public void OnPluginEnd()
{
    for(int i = 0; i < sizeof(gS_WeaponClasses); i++)
    {
        if(gD_Weapons[i].IsValid)
        {
            gD_Weapons[i].Dispose();
        }
    }
}
__________________
retired

Last edited by shavit; 07-15-2016 at 23:41.
shavit 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 12:43.


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