angular-ui/ui-grid

Memory leak on ui-grid-menu showMenu

Open

#3,972 建立於 2015年7月13日

在 GitHub 查看
 (1 留言) (0 反應) (1 負責人)JavaScript (2,496 fork)batch import
help wantedseverity: memory leaktype: bug

倉庫指標

Star
 (5,395 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hi,

On ui-grid-menu.js, there are 2 methods showMenu and hideMenu that are added to scope but also are added to some self variable that happens to be the ``window` object.

The problem is that in a spa app, navigating away from the list, on the window object that is not going to be destroyed, the 2 functions will remain with the scope as context variable, so all the grid objects, columns, rows will be carried through the rest of the journey.

The 2 functions seem to be used only through scope, so no need for them on the ``window` ... at least to the point I got now.

貢獻者指南