Skip to content

Commit

Permalink
Fix: Hidden columns could cause a memory leak when destroying a table
Browse files Browse the repository at this point in the history
- Thread 47356
  • Loading branch information
Allan Jardine committed Jan 24, 2018
1 parent 81be34c commit 1790bb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/dataTables.colReorder.js
Expand Up @@ -740,9 +740,9 @@ $.extend( ColReorder.prototype, {
// Destroy clean up
$(table).on( 'destroy.dt.colReorder', function () {
$(table).off( 'destroy.dt.colReorder draw.dt.colReorder' );
$(that.s.dt.nTHead).find( '*' ).off( '.ColReorder' );

$.each( that.s.dt.aoColumns, function (i, column) {
$(column.nTh).off('.ColReorder');
$(column.nTh).removeAttr('data-column-index');
} );

Expand Down

0 comments on commit 1790bb6

Please sign in to comment.