Well here's the thing. I'm not using finalizers at all, I only put a couple
in to see if they get fired or not. I did a bit more searching and in the
assembly that I am trying to load I only use ADO.NET and a couple of
webservices, and even then the ADO.NET isn't doing very much, just a few
selects and a couple of inserts.
When I run this assembly outside of the calling assembly in a test app it
works fine. It's just when I load it dynamically into the calling assembly.
Another interesting point is that if I put a GC.Wait ForPendingFinalizers in
the called assembly after the webservice call, it hangs, but again when I put
it into a test app with no dynamic assembly loading it works fine and is
removed correctly. I wonder whether it's my lack of understandin when it
comes to assemblies and the garbage collectors and finalizers.
Cheers
> What are you doing in the finalizer? The finalizer runs on a separate
> thread, and if the thread gets blocked in unmanaged code you are probably
[quoted text clipped - 24 lines]
> >
> > Chris
David Levine - 21 Oct 2004 10:31 GMT
I don't have any experience with ADO.NET so I cannot help you there. It
sounds like you are doing something more then what you describe here but
without seeing the actual bits I cannot tell what that might be. If you can
boil this down to a small sample program that duplicate the problem someone
here might be able to assist you.
> Well here's the thing. I'm not using finalizers at all, I only put a
> couple
[quoted text clipped - 47 lines]
>> >
>> > Chris
uAsking - 27 Oct 2004 12:07 GMT
Well a funny one. The problem is caused by the app domain being processed
within a thread or a timer. I don't know what this is a problem but it is.
Once I took the appdomain load / unload out of the thread it solved the
problme. I'm now trying to create work arounds so that it is multithreaded
but then also not by having the unloader work within a seperate process type
thingy. It's all a bit much. I don;t fully understand as it works in a
another thread related to sockt communication, but there we go. I'm not
complaining.
> I don't have any experience with ADO.NET so I cannot help you there. It
> sounds like you are doing something more then what you describe here but
[quoted text clipped - 53 lines]
> >> >
> >> > Chris