Results 1 to 2 of 2

Thread: [DEFER] 3.2.0 Potential memory leak in Component mon() & mun()

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2008
    Posts
    23
    Vote Rating
    0
      0  

    Default [DEFER] 3.2.0 Potential memory leak in Component mon() & mun()

    If you call mon() with the same arguments multiple times, each call will add another listener object to the mons array, even though the listener is only registered with the Observable once.

    For example:
    Code:
    ...
    doSearch: function(params) {
        ...
        this.mon(this.store, "load", this.onSearchResults, this);
        ...
    }
    ...
    The first call to doSearch will add a "load" listener to the store, and add an item to the mons array. Subsequent calls won't cause another "load" listener to be added, but it does add another item to the mons array.

    Calling mun() to remove a listener only removes the first instance found in the mons array.

    Either the mon() code should check if it already exists in the mons array or it should call mun() before pushing another item into the mons array.

    I think the typical usage scenario won't lead to memory leaks, as the calls to mon() would likely only happen once during initialization, and the entire mons array gets cleaned up when the Component is destroyed; however, there's still potential for problems.

    --Chad Eberle
    Web Application Architect

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
      0  

    Default

    Yes, we're looking to refactor the mon/mun code for the next minor release.

Similar Threads

  1. Replies: 15
    Last Post: 30 Nov 2009, 10:36 AM
  2. What the hell is mon and mun?
    By jsakalos in forum Community Discussion
    Replies: 7
    Last Post: 20 Sep 2009, 11:52 PM
  3. [CLOSED][3.0rc1.1] IE - Grid component reload memory leak
    By da_sweetp in forum Ext 3.x: Bugs
    Replies: 6
    Last Post: 4 Jun 2009, 9:37 AM
  4. Add and remove component dynamically lead to memory leak in IE 6?
    By lionhx18 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 13 Jan 2009, 11:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •