title: Castle Windsor Releasing Components
body: <p>EDIT:</p>
  
  <p>I've completed rephrased the question as I've been able to simplify my problem down to the following:</p>
  
  <pre><code>        var container = new WindsorContainer();
  
          container.Register(Component.For&lt;IFoo&gt;().ImplementedBy&lt;Foo&gt;().LifeStyle.Singleton);
          var foo = container.Resolve&lt;IFoo&gt;();
          container.Kernel.ReleaseComponent(foo);
          var foo2 = container.Resolve&lt;IFoo&gt;();
  
          Assert.IsTrue(foo != foo2) // this fails
  
  public interface IFoo : IDisposable { }
  
  public class Foo : IFoo {
      public void Dispose()
      {
  
      }
  }
  </code></pre>
  
  <p>I must be doing something really stupid here...any idea what?</p>
  
  <p>Basically, what I'm trying to accomplish here is for a all resolutions of a component to return the same instance for some period of time (a scope). If there is a better way of accomplishing this, I'm certainly open to it.</p>
  
  <p>EDIT:
  Ok, so I RTFM and apparently this is by design. Is the best way of accomplishing what I want here still a custom lifestyle manager?</p>
  
  <p>Thanks.</p>