Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Memory leak with DynamicForm inside Window

    Hello,

    I've discovered that when DynamicForm (any DataBoundComponent) actually is drawn as part of Window, memory leak happens. Code to demonstrate this is below. After you run the code, please see how many live instances of RulesEngine class you have (isc_RulesEngine_0 etc objects in DevConsole). Those objects are not destroyed and (which is where I discovered the problem) hold reference to already destroyed "Window" objects. This did not happen in v11 where RulesEngine was not even created when DynamicForm is drawn. The problem most probably existed there though because if you call dynamicForm.getRulesEngine() explicitly (which is internal method I know), that instance of RulesEngine is never destroyed.

    The code to demonstrate the problem:

    var windows = []

    for (var i = 0; i < 10; i++) {
    var w = isc.Window.create({
    items: [
    isc.DynamicForm.create({fields: [{ name: "SomeField", editorType: "TextItem"}]})
    ]
    });
    w.show();
    windows.push(w);
    }

    setTimeout ( function() {
    for (var i =0; i < windows.length;i++) windows[i].destroy()
    }, 1000);

    #2
    What version and build of SmartClient are you using?

    Comment


      #3
      We're using v12.0p_2019-12-04 but the problem was recreated in your online demo by pasting specified code, running it and looking into DevConsole

      Comment


        #4
        Thanks for your report. Please retry your test with the latest build as of 01/03/2020.

        Comment

        Working...
        X