Home
Manage Your Code
Snippet: Resurrect a finalized object (C#)
Title: Resurrect a finalized object Language: C#
Description: If you want to resurrect a finalized object (i.e. in object pools) check first if it's possible! Views: 148
Author: Diego Guidi Date Added: 1/23/2007
Copy Code  
1// Check object resurrection

2private static bool CanResurrect() 
3{
4	return 	!Environment.HasShutdownStarted &&
5		!AppDomain.CurrentDomain.IsFinalizingForUnload();
6}