Forum Discussion

ameett's avatar
ameett
Contributor
13 years ago

Memory release held by global variables

Hello,



How cam the memory held by global variables be released during run time if that variable will no longer be used ?



I want to release the memory held by global variables at the end of the script.



Thanks in Advance

Ameett

4 Replies

  • These are not declared at Project suite or Project level.........these variables are declared in the function........i have declared them global so that i don't have to return values......these value assigned to the variables can be used by just calling the function in which it is declared.



    Thanks,

    Ameett
  • gentlesea's avatar
    gentlesea
    Frequent Contributor
    var projectSuiteaqFS = aqFileSystem.GetFolderInfo(ProjectSuite.Path);

    [...]

    projectSuiteaqFS = undefined;
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Ameett,


    I'm using the following approach:



    var GlobalVar = "String";



    function Test()

    {

     Log.Message(GlobalVar);

     GlobalVar = null;

     Log.Message(GlobalVar);

    }


    Does this help?