                 var parentComponent:UIComponent = styleClient.styleParent as UIComponent;
                 if (parentComponent)
                     parentComponent.removeStyleClient(styleClient);
-               }
-
-                if (advanceStyleClientChildren == null)
-                advanceStyleClientChildren = new Vector.<IAdvancedStyleClient>();
-
-            advanceStyleClientChildren.push(styleClient);
+            }
+            // Create a dictionary with weak references to the key
+            if (advanceStyleClientChildren == null)
+                advanceStyleClientChildren = new Dictionary(true);
+            // Add the styleClient as a key in the dictionary. 
+            // The value assigned to this key entry is currently not used.
+            advanceStyleClientChildren[styleClient] = true;  
             styleClient.styleParent=this;
-
+            
             styleClient.regenerateStyleCache(true);
-
+            
             styleClient.styleChanged(null);
         }
         else


        if (advanceStyleClientChildren != null)
        {
            var nAdvanceStyleChildern:int = advanceStyleClientChildren.length;
            for (var j:int = 0; j < nAdvanceStyleChildern; j++)
            {
                var iAdvanceStyleClientChild:IFlexModule = advanceStyleClientChildren[j] as IFlexModule;
                if (!iAdvanceStyleClientChild)
                    continue;

                if (iAdvanceStyleClientChild.moduleFactory == null 
                    || iAdvanceStyleClientChild.moduleFactory == _moduleFactory)
                {
                    iAdvanceStyleClientChild.moduleFactory = factory;
                }
            }
        }

        _moduleFactory = factory;

        setDeferredStyles();

    /**
     *  @private
     */
    mx_internal var advanceStyleClientChildren:Dictionary = null;

    /**
     *  Adds a non-visual style client to this component instance. Once 
