Changes between Initial Version and Version 1 of Ticket #10050, comment 5


Ignore:
Timestamp:
May 23, 2014, 11:19:02 AM (9 years ago)
Author:
scott.k.mitch1
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10050, comment 5

    initial v1  
    11Replying to [comment:4 scott.k.mitch1]:
    2 > Thanks for looking into this issue.  I have been evaluating and contributing to a few of other open source packages that have more severe memory leaks for my use-case. Unfortunately this means I have not had time to dive into Autocomplete.
    3 >
    4 > A few general things to look out for are:
    5 > * Clean up any jquery data cache you may be using. It is good practice to accompany any calls to {{{.data('x',y)}}} with a {{{.removeData('x')}}}
    6 > * In general avoid using references to DOM elements in anonymous functions which are defined outside the scope of that anonymous function. Re-select unless you are sure the anonymous function will be made eligible for GC.  For example if the anonymous function is used to register for an {{{.on('click', ...)}}} then you want to make sure you do an {{{.off('click', ...)}}} or equivalent call to un-register the event so there is no longer a reference to the anonymous function
    7 > * Avoid storing references to DOM elements in the {{{data}}} cache, or if you must make sure that you clean up after yourself. (inspect line 539 {{{return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );}}})
     2Hum...I meant to click 'Edit' but instead I clicked 'Reply'. I don't see a way to delete this so just Ignore this reply.
     3
     4Why the custom issue interface?  Doesn't Jira offer free issue hosting to open source projects?