Cook Computing

I've started a small project

April 21, 2002 Written by Charles Cook

I've started a small project in Managed C++. Its a library which encapsulates some COM APIs and using Managed C++ seemed the obvious approach to minimising the effort around COM Interop. Its something I've been meaning to do for a while and its fairly limited scope will provide a good introduction to Managed C++. I read someone recently claiming that the majority of managed software development in the near future will involve porting existing C++ code using Managed C++ and I would also guess that is likely to be the case. You can be sure that the added complexity of handling both managed and unmanaged code/types in the same project will cause even worse maintenance nightmares than many C++ projects have already.

Coming from a COM background the old lack of deterministic finalization problem still rears its ugly head and as yet I can't see a solution other than calling GC.Collect fairly frequently. I've done a lot of COM work in situations where the COM objects represent scarce resources and it is essential that an object has final release called on it as soon as a clent is finished with it. IDisposable and the using construct may support a new paradigm for resource management but as yet I'm unconvinced. I can see their use in simple situations but not when passing around references to objects which are consuming resources. I may be wrong - hence the small trial project before getting involved in anything more substantial.