[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Newbie question - variables and memory

Ben V.

7/22/2006 9:27:00 PM

I may be wrong, but I might have read somewhere that there's a need to
delete variables from memory. In my web environment, can the same
variable or instance (@) variable retain the same value across multiple
requests, or was that about something else? (I know about session and
fom variables, and flashes, but I'm talking about regular variables or
instance variables) Thanks for your help and time.

--
Posted via http://www.ruby-....

1 Answer

hanumizzle

7/23/2006 1:57:00 AM

0

Ben V. wrote:
> I may be wrong, but I might have read somewhere that there's a need to
> delete variables from memory.

In normal usage, no. Ruby supports garbage collection, meaning that
memory allocated for objects no longer reachable will be reclaimed.

> In my web environment, can the same
> variable or instance (@) variable retain the same value across multiple
> requests, or was that about something else? (I know about session and
> fom variables, and flashes, but I'm talking about regular variables or
> instance variables)

You are talking about two very different things. Here, I think you're
digressing into CGI. And in that case, you should see the Sessions
section of this article: http://www.rubycentral.com/article...

Management of CGI session data is wholly distinct from Ruby's
management of objects in general. Ruby the language knows nothing about
CGI, CGI sessions, or persistent data from those sessions. These are
implemented via the external CGI library.