| || |
if I use texit or exit to get out of the function,should I use unload first?
At the beginning of the function ,I use load script to load other functions in.when I check sth wrong ,I will use texit or exit to stop it .should I use unload functions out before I exit???
Thanks a lot!!
Re: if I use texit or exit to get out of the function,should I use unload first?
Most people don't need to worry about unloading functions. If you, however, have limited memory and/or use a massive amount of functions, you may want to consider it. If that's the case, you should probably unload any functions you have loaded once they are no longer necessary. If you use these functions a lot, it's probably better to load them in some form of init script instead of in another function.
If your functions are loaded as a "system module", they will remain in memory after the 'texit' is executed. Otherwise, they will be unloaded automatically.
I general, I suggest using an init script specific to a project that will load all the functions that are necessary for test execution.
Patterson Consulting Services
Developing Software Tools to Help WinRunner Automators