Hi Greg,

I'm no expert on silverlight but I thought that all WCF calls were async. It
that is the case then it is possible you are seeing async threads being
halted when the app shuts down. As this halts the execution of the thread
before the end of the using block the services are never Disposed but they
are Finalized as the AppDomain is teared down.

Just a guess.

Mike

On Wed, Apr 14, 2010 at 7:20 AM, Greg Keogh <[email protected]> wrote:

>  Folks, I just rearranged some old Silverlight code so that a WCF proxy is
> now wrapped in a using(...). I’ve got Debug.WriteLine scattered through the
> Disposible proxy class so I can see the short lifetime of this class as it
> is created and disposed. I see repeated groups of lines like this:
>
>
>
> ctor
>
> make proxy
>
> proxy call
>
> dispose(true)     *true=called from Dispose, false=called from ~finalizer*
>
> close proxy
>
> null proxy
>
>
>
> I can see that each class instance is being constructed and disposed as I
> expect. However I was surprised to see these lines when the App and browser
> were closed.
>
>
>
> dispose(false)
>
> dispose(false)
>
> dispose(false)
>
> dispose(false)
>
> -etc-
>
>
>
> So the classes are still hanging around, but aren’t being finalized by the
> GC until the App end. I know the classes aren’t holding any important
> resources any more, but I was quite surprised to see them all being
> finalized in a bunch so late. I had this funny feeling that something was
> wrong, or is what you would expect?
>
>
>
> Greg
>



-- 
Michael M. Minutillo
Indiscriminate Information Sponge
Blog: http://wolfbyte-net.blogspot.com

Reply via email to