docs: function destroy(obj) {
      for (var i in obj) {
          if (obj.hasOwnProperty(i) && obj[i]) {
              if ($.isArray(obj[i])) {
                  obj[i].length = 0;
              }
              if ($.isFunction(obj[i].destroy)) {
                  obj[i].destroy();
              }
              delete obj[i];
          }
      }
  }