dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [DotGNU]lesson in dispose


From: Neil Cawse
Subject: RE: [DotGNU]lesson in dispose
Date: Sun, 16 Nov 2003 14:03:10 -0500

> It's easy to free unmanaged resources prematurely. Specifically, if a
> managed
> object contains a reference to an unmanaged object but there other
> references
> to the unmanaged object elsewhere, it's not yet safe to free the
unmanaged
> object.

Yes you are right, that's why I think its important to make sure that an
unmanaged resource is not used by more than one managed object, and if
it needs to be, it should be wrapped in another object that implements
IDisposable.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]