zambezi / grid

D3 component for drawing grids
MIT License
4 stars 2 forks source link

Fix selection changed memory leaks #40

Closed gabrielmontagne closed 7 years ago

gabrielmontagne commented 7 years ago

Description

References to selection-changed key functions are being held at module-level on some of the grid components. This prevents, in some cases, the grid/grid data from being GCd.

This PR moves those into the component "instances", which now get collected when the grid is closed.

Some other unused constants and functions were also removed.

How Was This Tested?

Offline, on an application which uses the grid at work. Also, all the grid examples were ran again and they still work as expected.

Types of changes

Checklist: