Hi yaron!
I wrote a manage c++ wrapper classes that wraps an unmanaged c++ classes.
if my unmanaged c++ classes don't used any critical resources , do i still
need to make my managed c++ wrapper classes to implement IDisposable just
because they are wrapping an unmanage c++ class ?
If you do not need to free memory or any other stuff, you do not need to
implement IDisposable.
In general you can say: If every method/property in your wrapper class
always instanciate a new unmanaged-class then also frees it, you do not
need an IDisposable...
If you instanciate your unmanaged class only once (for example in the
managed constructor) you should implement IDisposable to free this
instance. I do not suggest to use the finilazier, because then you will
be called from a different thread (if at all) and some unmanaged classes
have some troubles with this...
--
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/