1. #1
    Ext JS Premium Member
    Join Date
    Nov 2007
    Posts
    74
    Vote Rating
    0
    sean.zhou is on a distinguished road

      0  

    Default Partial solution to memory leak by ajax

    Partial solution to memory leak by ajax


    One scenario of having memory leak by ajax is when validating the value of a combobox by ajax. The combobox is referenced in/by the ajax callback function. However, if the combobox is destroyed for some reason, it cannot be garbaged collected unless the callback function is also destroyed. Unfortunately, at the time of destroying the combobox there is no way to know which callback functions are referencing the combobox. The following link provides a partial solution to this problem.

    http://jaffa.wiki.sourceforge.net/ja...ajaxMemoryleak

    I am interested in hearing your feedback and suggestions to improve.

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,137
    Vote Rating
    321
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    I think that General Discussions Forum would be more suitable for this subject. Non-premium users that may have a valuable comment cannot post here.

    If you want I can move this thread there.

  3. #3
    Ext JS Premium Member
    Join Date
    Nov 2007
    Posts
    74
    Vote Rating
    0
    sean.zhou is on a distinguished road

      0  

    Default


    Yes. Please move this thread to General Discussions Forum. I did not aware of this difference. I am using ExtJs 2.1.

  4. #4
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    4
    mystix will become famous soon enough

      0  

    Default


    if the Combo is destoyed mid-ajax call, couldn't you hook into the Combo's destroy event and cancel the underlying Store's Ext.Ajax.request, then purge all of the Combo's listeners (and hence callbacks)?

    (note 1: the existing codebase does not destroy the Combo's store when the Combo is destroyed -- it only dissociates the Store from the Combo using the Combo's private bindStore() method, then purges all Combo listeners)
    (note 2: ajax calls made via Ext.Ajax.request() are assigned unique transaction ids which may later be cancelled using Ext.Ajax.abort(<transaction id>))

  5. #5
    Ext JS Premium Member
    Join Date
    Nov 2007
    Posts
    74
    Vote Rating
    0
    sean.zhou is on a distinguished road

      0  

    Default


    Thanks Mystix. It sounds like a good approach. Although we are using different store for ajax validation, we can still register that store to the combobox. When combobox is destroyed, abort the ajax call.

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar