title: Guidelines For Dispose() and Ninject
body: <p>So, I have a method exposed from a WCF service as such:</p>
  
  <pre><code>public GetAllCommentsResponse GetAllComments(GetAllCommentsRequest request)
  {
      var response = new GetAllCommentsResponse();
  
      using(_unitOfWork)
          try
          {
              Guard.ArgNotNull(request, "request");
  
              var results = _unitOfWork.CommentRepository.Get(d =&gt; d.Id &gt; 0).ToArray();
  
              //... Do rest of stuff here
          }
          catch (Exception ex)
          {
              response.Success = false;
              response.FailureInformation = ex.Message;
              Logger.LogError("GetAllComments Method Failed", ex);
          }
  
      return response;
  }
  </code></pre>
  
  <p>I have a global DataUnitOfWork object (which implements IDisposable) that gets instantiated by Ninject through a constructor argument when a service call comes in. When debugging, if I use </p>
  
  <pre><code>using(_unitOfWork)
  </code></pre>
  
  <p>the _unitOfWork object gets disposed immediately after going out of scope then gets called again by Ninject (although it's been marked as disposed, so nothing happens.) Without the using statement, Ninject handles the disposing.</p>
  
  <p>Long story short, is there a general rule of thumb for this? I've been scared of the whole IDisposable thing after everything I read seems to indicate never to use it, or use it in certain eclectic situations, but it's always confused me.</p>
  
  <p>Any input is appreciated.</p>
  
  <p>Oh, also while I'm here typing anyway, why exactly is there a call to GC.SuppressFinalize() when disposing? How do Dispose and Finalize differ?</p>