It is fine to access the dropDown property as long as it doesn't happen after 
other clean up code runs.

It might be worth debugging to see if the dropDown is the actual problem.  It 
could be something else, like some eventhandler that handles an event you 
dispatch from your code keeps a reference to the combobox.  So use the debugger 
 or profiler or other means to see if the dropdown is still on the display 
list.  You can report on the children in SystemManager.popUpChildren.  You can 
verify that the ComboBox's destroyDropdown is being called.  And then try to 
verify that dropDown is not accessed after that.

HTH,
-Alex

On 2/2/19, 1:43 PM, "Paul Stearns" <pa...@compuace.com.INVALID> wrote:

    Alex:
    
    Yes this code does reference the DropDown component. The code is there to 
handle finding items and moving the cursor to the appropriate item.
    
    For example if the data is;
    
    dog
    cat
    bird
    
    and c-a-t is typed it finds cat and highlights it.
    
    If the data provider changes and the values become;
    
    dog
    lizard
    cat
    bird
    
    the component will still keep cat highlighted.
    
    Given the above as a requirement, how can I clear make the component 
eligible for GC?
    
    Paul R. Stearns
    Advanced Consulting Enterprises, Inc.
    
    15280 NW 79th Ct.
    Suite 250
    Miami Lakes, Fl 33016
    
    Voice: (305)623-0360 x107
    Fax: (305)623-4588
    
    ----------------------------------------
    From: Alex Harui <aha...@adobe.com.INVALID>
    Sent: 2/2/19 1:55 AM
    To: "users@flex.apache.org" <users@flex.apache.org>, "pa...@compuace.com" 
<pa...@compuace.com>
    Subject: Re: At least one memory leak problem is a custom combo box I use.
    Hard to say for sure, but one thing to watch out for with ComboBox is 
running any code that accesses the dropdown property. ComboBox by itself should 
know how to destroy and unhook the dropdown, but if you run code that access 
dropDown after ComboBox thinks it cleaned up, then it will get stuck in memory 
again.
    
    HTH,
    -Alex
    
    On 2/1/19, 10:19 PM, "Paul Stearns" wrote:
    
    Alex:
    
    I have found that using a custom combo box I built causes the module that 
contains it to stay in memory.
    
    If I create a new instance but do not access it, everything is fine, As 
soon as I touch the dataprovider, it will not allow the parent module to unload 
(even if I set the dataProvider to null). I changed it to a standard combobox, 
and everything is ducky, but that doesn't have the features I need.
    
    If you could take a look at my ValidatedComboBox function and see if it is 
something obvious, I'd appreciate it.
    
    
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpastebin.com%2FHyMTCC1Y&amp;data=02%7C01%7Caharui%40adobe.com%7Cfb19977d8bca48a31d7708d6895783f6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636847406335722938&amp;sdata=ZQASYXvbPPMfWDk8kWtVTskwz1Z%2BPF7UVmXEWUBF%2Bek%3D&amp;reserved=0
    
    Paul R. Stearns
    Advanced Consulting Enterprises, Inc.
    
    15280 NW 79th Ct.
    Suite 250
    Miami Lakes, Fl 33016
    
    Voice: (305)623-0360 x107
    Fax: (305)623-4588
    
    
    

Reply via email to