Re: seperate service thread

From: David Browne (meat_at_hotmail.com)
Date: 08/28/04


Date: Sat, 28 Aug 2004 17:00:29 -0500


"Steve C. Orr [MVP, MCSD]" <Steve@Orr.net> wrote in message
news:OTwt$bIjEHA.592@TK2MSFTNGP11.phx.gbl...
> Once a page has been rendered, any threads it created are eventually
> orphaned and become potential targets for the .net garbage collector. How
> often the garbage collector runs varies, depending on the load of your
> server & such.
>

Nope. Threads are roots. A running thread and everything it references is
safe from the garbage collector. Even if this weren't the case, the static
reference to the thread would keep it reachable and keep it from being
collected.

David



Relevant Pages

  • Re: Python language problem
    ... references and you cannot free an object. ... The garbage collector will do it for you automatically, ... access the resource, ... I create same object in Tree, I want to update Tree, when I need to ...
    (comp.lang.python)
  • Re: FastMM and garbage collection...
    ... It seems to me that the memory manager has all the information required ... Such references could be pretty much ... So how would your garbage collector determine which objects are no ... total control of all threads and have complete type information about ...
    (borland.public.delphi.language.basm)
  • Re: Setting objects to Nothing uses less memory!
    ... The garbage collector only does one pass and frees ... "bigObjects" and its internal instance of "lotsOfData" in the first ... > I think people often get confused about setting references to null. ... > The key is your InternalSetNull() method. ...
    (microsoft.public.dotnet.framework.performance)
  • Re: Dispose must be thread-safe ?
    ... > I admit that due to my limited knowledge of GC-ing in .NET I was not able to ... > other thread still references it and even calls Dispose method on it)?? ... method would include an implicit "root" (from the garbage collector's ... it doesn't stop the garbage collector from trying to ...
    (microsoft.public.dotnet.framework.clr)
  • Re: does python have useless destructors?
    ... "Called by the garbage collector on an object when garbage collection ... determines that there are no more references to the object." ... Let Java code ... > use Java idioms. ...
    (comp.lang.python)