Alex Rivera | Logout

Garbage collection of static members

Asked 2009-05-12T06:15:19.153
13

Will static members be ever collected by the garbage collector?

Edit
Report

1 Answer

6

Members are not collected... Objects are.
So if you set the Ref. Type static member to null, any object it was previously pointing to would be collected. If not, it will hang around till the AppDomain goes down (Each AppDomain has its own set of static stuff)

answered 2009-05-12T06:16:38.513

Your Answer