SlickGrid icon indicating copy to clipboard operation
SlickGrid copied to clipboard

memory leak using SlickGrid

Open btfurukawatkr opened this issue 9 years ago • 4 comments

I seem to have encountered a memory leak issue while using the SlickGrid. I read the other Issues regarding a memory leak, but was not so sure if it was the same issue with me, so I decided to make a new Issue.

I have created a sample application to confirm this issue here

https://github.com/btfurukawatkr/slickgrid-sample

Here's what I did with the sample application.

  1. access to insert-and-delete-row.html
  2. create new row
  3. fill Title and %Complete
  4. repeate 2 and 3 for 4 times(add total 4 rows)
  5. delete the added rows from the old ones
  6. execute GarbageCollection
  7. repeate 2 to 6 for 20 times

I used

  1. windows7 Professional Service Pack 1
  2. Chrome-55.0.2883.75 m (64-bit)
  3. SlickGrid : v2.3.2
  4. jquery : v1.11.1
  5. jquery-ui: v1.11.1

This was the result. (the memory keeps on increasing)

ws000003

btfurukawatkr avatar Dec 05 '16 08:12 btfurukawatkr

Will take me a little while to test, but I suspect that it's because you are binding a click event to the buttons. Elements with bound events are not removed from the DOM. Either (a) unbind the event before deleting the row in your code (b) move to a layout where you select rows and have a single 'delete' button outside the grid (c) use the AsyncRender cleanup function as per the examples

6pac avatar Dec 06 '16 01:12 6pac

Hi @6pac , Thanks for your quick response. I'll see if your suggestions work with my application.

btfurukawatkr avatar Dec 07 '16 01:12 btfurukawatkr

Is this fixed?

6pac avatar Dec 14 '16 07:12 6pac

sorry @6pac , haven't got the time to check it yet...

btfurukawatkr avatar Dec 19 '16 04:12 btfurukawatkr