Groups | Blog | Home
all groups > asp.net > july 2004 >

asp.net : LifeSpan of a Static variable


sunil NO[at]SPAM volcanomail.com
7/3/2004 11:28:27 PM
Dear All,
I have declare a static object of my class in a WebService. What is
the life span of this Object? Will GC clean it up if it is not used or
accessed? Or Will the worker process keep it alive till it gets
recycled?

Please help

TALIA

Many Regards
Scott Allen
7/5/2004 12:57:01 AM
Hi Jack:

The static will be around for the duration of your application. The GC
will not touch a reference your application can still reach and use.

HTH,

--
Scott
http://www.OdeToCode.com

On 3 Jul 2004 23:28:27 -0700, sunil@volcanomail.com (Jack Wright)
[quoted text, click to view]
AddThis Social Bookmark Button