I think this is a reflection question
Cool idea, but just because they are not marked for GC doesnt *always* mean
that you failed to do something. As you already know, Garbage Collection is
something that is handled by the creator of the class and my not coordinate
with the destruction of your variables. I think the best plan would be to
just pay close attention to what you are doing with your variables. Going
through and destroying huge blocks of data because it's not marked for GC
could cause some big problems. But I could be wrong.
good luck & let me know if you figure it out.
Quote:
> Thanks but I already know how to get all types from the excecuting
assembly.
> The real trick I want is to find out how many instances of any given type
> are active and not marked for garbage collection. That would help me make
> sure I'm properly freeing resources in my app.
> Bob
> > I dont know if this helps, but here is a way to get ALL Types from every
> > loaded dll:
> > Dim thisExe As Reflection.Assembly
> > Dim Ms() As Reflection.Module
> > Dim M As Reflection.Module
> > Dim Ts() As Type
> > Dim T As Type
> > thisExe = System.Reflection.Assembly.GetExecutingAssembly
> > Ms = thisExe.GetLoadedModules
> > For Each M In Ms
> > Ts = M.GetTypes()
> > For Each T In Ts
> > Debug.WriteLine(T.Name)
> > Next
> > Next
> > > Is there a way to get a list of all instantiated classes that have not
> > been
> > > marked for garbage collection?
> > > Bob