<p>I have an object that implements IDisposable that is registered with the Windsor Container and I would like to dispose of it so it's Dispose method is called and next time Resolve is called it fetches a new instance.</p>

<p>Does </p>

<pre><code>container.Release(obj); 
</code></pre>

<p>automatically call Dispose() immediately?  Or do I need to do</p>

<pre><code>obj.Dispose();
container.Release(obj);
</code></pre>

<p>Couldn't find anything in the documentation on what exactly Release does</p>

<p><strong>EDIT:</strong>
See my answer below for the results of tests I ran.  Now the question becomes, how do I force the container to release an instance of a component with a singleton lifecycle?  This only needs to be done in one place and writing a custom lifecycle seems far too heavyweight, is there no built in way of doing it?</p>

It depends on the lifestyle of the component you specified when you added it to the container.
You would use Release() If the lifestyle is Pooled.  This puts the component back in the pool for the next retrieval (the object is not destroyed, so disposing would be bad)
if the lifestyle is transient, a new object is created when you get the component.  In this case the disposal is up to you, and you do not need to call Release
If the lifestyle is Thread, the same component is used for each thread, not destroyed.
If the lifestyle is Singleton, only one component is created and not detroyed.
Most likely, you are using transient components? (if you are concerned about disposing of them in a timely manner)
in that case, just wrap it with a using and you're set (or call the dispose yourself somewhere)
```
```
using(ISomeService service = container.Resolve<ISomeService>())
{
 // Do stuff here
 // service.Dispose is automatically called 
}
```
```
Edit
- Yes, in order to "refresh" or dispose and recreate your singleton you would need to either destroy the container or write a custom lifecycle.  Doing a custom lifecycle is not actually that difficult and keeps the logic to do so in one place.