opensubscriber
   Find in this group all groups
 
Unknown more information…

a : advanced-dotnet@discuss.develop.com 19 September 2008 • 7:54PM -0400

Re: [ADVANCED-DOTNET] Unmanaged resources in a static class
by Simon Robinson

REPLY TO AUTHOR
 
REPLY TO GROUP




Thanks for the replies everyone.  Static reference to an instance does
sound on the surface to be the easiest solution. I have one doubt though:
It's occurred to me to wonder whether finalizers are guaranteed to be
executed when the app exits? They are executed when a garbage collection
happens but that's not the same thing. Does .NET do a garbage collection
on app exit or does it just rely on Windows freeing up everything?  If it
doesn't then keeping a static reference presumably won't make any
difference.

Ta

Simon

On Wed, 17 Sep 2008 19:33:14 -0700, Greg Young <gregoryyoung1@GMAI...>
wrote:

>why not keep a static reference to an instance of the class instead of
>using a static class?
>
>Cheers,
>
>Greg

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.