If you don't need interactivity, this sounds like an ideal place for bitmap caching. Do you need to have the user click on various items within the display, or have some other kind of real-time interactivity? If not you can create a bitmap image of your UIComponent (or at least the non-interactive parts), and then attach the BitmapData to multiple Bitmaps in different locations on the stage.
Additionally if you are re-loading the same images for each individual UIComponent, you can re-use the BitmapData between instances of your custom UIComponent to reduce your footprint significantly. Chris 2009/12/1 Sébastien Tromp <[email protected]> > > > Hello, > > In fact - I don't know what I really need from Canvas. I'll try and replace > it with UIComponent to check if it can reduce the footprint. Thanks for the > advice. > I did a profiling of the object, and the majority of the memory consumption > (between a third and a half) comes from extensions of the Image class (in > fact, each of my component instance has around 40-45 images attached to it, > most of them being identical and simply laid out differently). > But I guess my issue is similar for these images: if a component can have > at most one parent, I have no choice but duplicate all these instances, do > I? > > Thanks for your advises, > -- > Seb > > 2009/11/30 Andriy Panas <[email protected]> > > >> >> Hi Sebastien, >> >> What exact functionality do you re-use from Canvas container? May be you >> can substitute Canvas with UIComponent to reduce the memory footprint? >> >> -- >> Best regards, >> Andriy Panas >> >> >> 2009/11/28 Sébastien Tromp <[email protected]> >> >> >>> >>> Hello, >>> >>> In my application, I have created an extension of a Canvas: >>> >>> class A extends Canvas >>> >>> This component is rather big in memory, and needs to be displayed in >>> several panels of the application at the same time. For instance, as a child >>> of another Canvas and as a child of a TitleWindow simultaneously. >>> >>> > >

