docs: function (def, superclass) {
          if (!Aria.memCheckMode) {
              return def.$constructor;
          }
          return function () {
              try {
                  if (!this['aria:objnumber']) {
                      __nbConstructions++;
                      this['aria:objnumber'] = __nbConstructions;
                      __objects[__nbConstructions] = this;
                  }
                  // check that parent constructors are correctly called
                  __checkInheritanceCalls(this, def, superclass, "$constructor", arguments);
              } catch (e) {
                  // if an exception occurs while creating the object,
                  // we do not need to call dispose on it and we don't want to decrease the counter
                  // more than once (in case the exception is in a grandchild constructor)
                  if (this['aria:objnumber']) {
                      __nbDestructions++;
                      __objects[this['aria:objnumber']] = null;
                      delete __objects[this['aria:objnumber']];
                      this['aria:objnumber'] = null;
                  }
                  throw e;
              }
          };
      }