Fix memory leak issue by howdyAnkit · Pull Request #2243 · eclipsesource/jsonforms

Hi @howdyAnkit, we were busy with the 3.2 release in the last two weeks, therefore the late reply.

From what you explained, I think the approach is sound.

This is the scenario to be tested:

JSON Schema

{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "age": {
            "type": "number"
          }
        }
      }
    }
  }
}

Ui Schema

{
  "type": "VerticalLayout",
  "elements": [
    {
      "type": "Control",
      "scope": "#/properties/enabled",
      "label": "Is Enabled"
    },
    {
      "type": "Control",
      "scope": "#/properties/people",
      "label": "People",
      "rule": {
        "effect": "ENABLE",
        "condition": {
          "scope": "#/properties/enabled",
          "schema": {
            "const": true
          }
        }
      }
    }
  ]
}

The table should still be enabled or disabled based on the enabled property.

I would also recommend to rebase the PR on the latest state of master to potentially fix the seemingly unrelated test errors.