Object Timeouts

  • Thread starter Thread starter robin9876
  • Start date Start date
R

robin9876

After an object is declared, how long will that object be available
until it time's out?
 
Not sure what you meant ? Generally speaking an object doesn't timeout.

An ASP.NET session last 20 minutes by default if this is what you meant.
What is the particular problem you have ?
 
After an object is declared, how long will that object be available
until it time's out?

It is available until all references on it are released (at a basic level).
 
objects are available as long as there is a reference (or the
application exists). asp.net pages are class instances that are create
at start of request, and released at end of request.


-- bruce (sqlwork.com)
 
Generally objects exist only while they are in scope. After that you can no
longer rely on it being around since the garbage collector will eventually
come around and clean it up (whenever it gets around to it.)
Generally an object created in ASP.NET only lives for milliseconds while the
related page is being rendered on the server. If you need an object to live
a long time then you might consider creating a windows service with which
ASP.NET can interact.
Here's more info on windows services:
http://msdn2.microsoft.com/en-us/library/aa983650(VS.71).aspx
 
Back
Top