I want to pool mx Window component because it is very complex, and creation is slow. But there is problem when addElement within pooled object is called. So, I suppose visual elements are not created after the line: new myMXWindowsClass()?
How to create custom Window component in background and use it later?
The general concept is to use a Factory class. A Factory class will create and manage instances of a component. The Flex Framework even includes a ClassFactory, although I do not think that does anything other than create them. You could extend it–or create your own–to keep track of classes used and classes not used. Then whenever a new instance is requested, check to see if there is an unused one available and provide that. If not; create one and provide that.
I use a technique like this in the Flextras Calendar to handle the days displayed when changing months or moving between the week, month, and day view. I also use this technique in my mobile game to handle the BitMapData used to create the game board.