I have a self-authored, in-house grid that displays a set of data and subscribes to several events, (eg. row click event, column click event). Every time the grid building function is called the first line of code is $grid.empty(), which should not only physically empty the grid of it's DOM elements, but also unbind these events. My graph below is showing a slow, but steady incline of event listeners. The upswing is data being loaded into the grid and events being wired up. It's growing an average of 10-11 event listeners per query. Not horrible, but in the course of an hour it makes the application unusable. Am I missing something or looking down the wrong path? Any help is appreciated.

More information: I've found that my jQuery function call is not clearing a variable at the end. Example:
$.fn.myCustomFunction = function(parm) { var grid = this; {some more code, AJAX call };
I need a grid = null at the end. However, because of it's context, it empties my grid completely.
on()with delegation so the listeners only need to be bound once. - Jason Plive()is deprecated as of 1.7. Also, there is an important difference betweenobj.on('click', function() { })andobj.on('click', 'selector', function() { }). Make sure you understand the difference, as that may be your issue. - Jason P