Skip to content

Destroy method not making all resources eligible for GC #419

@Scottmitch

Description

@Scottmitch

It seems like the selectize.js module's destroy method is not fully releasing all resources to the GC. Use this test case and follow the instructions below to confirm this issue.

  1. Click on selectize input so that drop down appears. This will allocate a bunch of DOM elements and memory
  2. Take a heap snap shot
  3. Click the Destroy link
  4. Force a GC and/or wait for GC to reclaim resources
  5. Observe that the Detached DOM Tree has references to the DIV and other DOM objects created by selectize (Note this can be done in google chrome dev toolbar). Using the timeline can also help to visualize the number of nodes allocated

According to the API it seems like the destroy method should be all that is required to make all resources eligible for GC. Let me know if there are additional steps required or for some other reason my analysis is incorrect.

The updated test case will run the same test case in an automated fashion 10 times so the memory and growth behavior can be observed without user interaction.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions