How should i track Objs in use, C#
<p>I have a manager that holds connections to the server. I keep the connection alive and i want my threads to request connections when it needs. My question is</p>

<p>How do i have track objects automatically? I would like it to work similar to scoped pointer. I request a connection, then when my obj goes out of scope it tells the manager it is not in use anymore. I wont be passing it around as a pointer. I'll be doing something like</p>

<pre><code>{
Obj = Man.GetObj();
//some loop
    Obj.DoSomething()
} //auto tell man that obj is no longer in use
</code></pre>
