The number of variables is not going to be a problem.  But watch out
if you have for instance several arrays with 50,000 elements in each.
Those can eat up some memory.

Ruby has what's called a "garbage collector" that handles removing
things that the script is done with.
-Chris

On 3/28/07, vijay <[EMAIL PROTECTED]> wrote:
> Hello people,
>
> Can we use as many variable names as we want in a script without worrying 
> about the memory wastage?  Each variable is going to occupy some bytes in 
> memory and those bytes would remain occupied as long as the script is 
> running.  If so, then in order to avoid memory wastage, to the maximum 
> possible extent, we need to use as few variables as possible in the script.  
> Is this right?  Can I make Watir free the memory space occupied by a variable 
> once I find that the variable is not needed anymore?  Thinking on the lines 
> of not wasting memory, I am using same variables again and again in the 
> script.  If I could find out a way, through you people, to free the memory 
> space occupied by a variable, I would use several variables with appropriate 
> names in the script.
>
> Thanks for your time,
> Vijay.
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to