I have rephrased this question.
When .net objects are exposed to COM Clients through COM iterop, a CCW (COM Callable Wrapper) is created, this sits between
I guess the reason for this not being possible is that a refcount of 0 does not mean that the object is not in use, because you might have a call graph like
VB_Object
|
V
|
Managed1 -<- Managed2
in which case the object Managed1 is still in use even if the VB object drops its reference to it and its refcount therefore is 0.
If you really need to do what you say, I guess you could create wrapper classes in unmanaged C++, which invokes the Dispose method when the refcount drops to 0. These classes could probably be codegen'd from metadata, but I have no experience whatsoever in how to do implement this kind of thing.