title: Will not resolving a deferred create memory leaks?
body: <p>Suppose the following code:</p>
  
  <pre><code>var deferred = $.Deferred();
  deferred.done(function(){
      // do something with events, references to dom, etc...
  });
  
  deferred.fail(function(){
      // do something with events, references to dom, etc...
  });
  </code></pre>
  
  <ol>
  <li><p>If I never end up calling <code>resolve()</code> or <code>fail()</code>, will this cause memory leaks, since I keep references in the callbacks?</p></li>
  <li><p>If I call one, but not the other, will the other be garbage collected? So if I call <code>fail()</code>, will jquery get rid of <code>done()</code>?</p></li>
  </ol>
  
  <p>I might be thinking wrong entirely, but would like some clarification. The closest I have found thus far was this <a href="https://stackoverflow.com/questions/20672972/shall-i-always-invoke-either-jquery-deferred-resolve-or-deferred-reject">Shall I always invoke either JQuery Deferred.resolve or Deferred.reject?</a>. But the use case is a bit different, since in that example the user has never defined a callback for <code>fail()</code>.</p>
  
  <p>I also came across this, <a href="https://stackoverflow.com/questions/11531184/can-jquery-deferreds-be-cancelled">Can jQuery deferreds be cancelled?</a>, however I am not trying to cancel a <code>deferred</code>.</p>
  
  <p>I understand that this is not best practice, but for the purpose of the question I am still curious if it would cause memory problems. </p>
  
  <p>Thank you,</p>