I have personally experienced problems with windows not properly
handling resources when processes are closed, in particular sockets.

We have some apps that act at TCP servers, if not shutdown properly
windows will periodically not allow another process to access the
socket the server was listening on even after the process has been
dead (sometimes for extended periods of time). Note that this only
happens occasionally and usually only after the server has been
running for an extended period of time. After scheduling "maintenance"
reboots for our various communications servers once a week the issue
went away.

I would definitely say that making sure things correct as opposed to
relying something to clean up for you is a good idea.

Cheers,

Greg

On Thu, Sep 18, 2008 at 6:27 AM, Curt Hagenlocher <[EMAIL PROTECTED]> wrote:
> On Wed, Sep 17, 2008 at 6:25 PM, Simon Robinson <[EMAIL PROTECTED]> wrote:
>>
>> right up until the app shuts down. However I am a bit nervous - this means
>> I'm entirely dependant on Windows to release all these resources when the
>> process ends, and although Windows should do that, to be honest I'm not
>> 100% sure I trust it to do so, I'd feel more comfortable if my managed
>> code contained something to explicitly ensure these resources are
>> released. (I trust .NET rather more than I trust the Windows OS :) )
>
> This is misguided.  I'd guess that Windows process cleanup is -if
> anything- more robust than .NET.  The only scenario where this really
> matters is, as others have suggested, when you have multiple
> AppDomains.  Of course, there's something to be said for
> "correctness", especially as you don't know how this code might evolve
> in the future.
>
> --
> Curt Hagenlocher
> [EMAIL PROTECTED]
>
> ===================================
> This list is hosted by DevelopMentor(R)  http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com
>



--
It is the mark of an educated mind to be able to entertain a thought
without accepting it.

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

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

Reply via email to