title: How to call destroy on disabled jquery widget?
body: <p>Used libraries: <code>jquery-ui-1.9.1</code> and <code>jquery-1.8.2</code></p>
  
  <p>I have one widget with some function called from <code>destroy</code> </p>
  
  <pre><code>$.widget("my.customwidget", {
  
      options: {
  
      },
  
      _destroy: function () {
          var self = this;
  
          this._super();
          //some usefull functionality
      },
  
      //some other declarations
  });
  </code></pre>
  
  <p>If my widget was disabled, due to code in jquery-ui destroy method is not called (code from jquery-ui):</p>
  
  <pre><code>function handlerProxy() {
      // allow widgets to customize the disabled handling
      // - disabled as an array instead of boolean
      // - disabled class as method for disabling individual parts
      if ( instance.options.disabled === true || $( this ).hasClass( "ui-state-disabled" ) ) {
          return;
      }
      return ( typeof handler === "string" ? instance[ handler ] : handler )
                      .apply( instance, arguments );
              }
  </code></pre>
  
  <p>this <code>handleProxy</code> is inside of <code>_on</code> function. The callStack looks like so:
  When element with my widget is removed, <code>$.cleanData</code> is called. Than <code>cleanData</code> calls <code>$( elem ).triggerHandler( "remove" )</code>and trigger calls <code>_on</code> for <code>remove</code> event. Than remove calls <code>$.widget.destroy</code></p>
  
  <p>How can I make call to destroy function even on disabled widget?</p>
  
  <p><strong>UPDATE</strong>: Created jsFiddle for demonstration <a href="http://jsfiddle.net/9yygj1wm/" rel="nofollow">http://jsfiddle.net/9yygj1wm/</a></p>
  
  <p><strong>UPDATE</strong>: This is fixed in <code>jquery-ui-1.9.2</code>, but how it can be fixed without upgrading of a library?</p>