I'm working with a WCF Client which looks like it's leaving String connection information in memory after an explicit close & the proxy going out of scope. The implementation I'm using is similar to this post:
Link to another stackoverflow discussion
I do the close on the Channel have confirmed it's not usable a second time. If I use DotMemory to analyze the memory I see 8 strings kept which look relative to the REST call mechanics. Retention objects look like this:
System.Net.TimerThread+TimerQueue ->
System.Net.TimerThread+TimerNode ->
System.Net.ConnectionGroup ->
System.Collections.ArrayList ->
System.Object[] ->
System.Net.Connection ->
System.Net.CoreResponseData ->
System.Net.WebHeaderCollection ->
System.String[] ->
System.String
The client I'm using to test this does almost nothing. A button which creates the proxy, uses it and then closes, my REST call works no problem.
using DotMemory Retention Path I see 2 paths which run through Timer:
System.Net.TimerThread+TimerQueue : Roots={Handle, Static reference }.m_Timers ->
System.Net.TimerThread+TimerNode.next ->
System.Net.TimerThread+TimerNode
Retention path of System.Net.TimerThread+Callback
System.Net.TimerThread+TimerQueue : Roots={Handle, Static reference }.m_Timers ->
System.Net.TimerThread+TimerNode.prev ->
System.Net.TimerThread+TimerNode.m_Callback ->
System.Net.TimerThread+Callback
If I want to figure out why the timer is in play, my guess is something weird is going on with the WebChannelFactory, maybe a default property I'm unaware of. This is just a straight REST call without any callback abilities.
Thanks for your patience, I'm a self taught C# person so please be gentle!