You werent exactly clear in your post. Are you leaking in the servant singleton or in the movie?
-- Dave Wolf Cynergy Systems, Inc. Macromedia Flex Alliance Partner http://www.cynergysystems.com Email: [EMAIL PROTECTED] Office: 866-CYNERGY --- In [email protected], "thunderstumpgesatwork" <[EMAIL PROTECTED]> wrote: > > Hi all, > > I've been coding in Flex now for a few months (basically since the 2.0 > Alpha came out) and I've been having a heck of a problem with memory > leaks. > > I was curious if there's any kind of rules or best practices to use > for cleaning up AS objects (destructors? finalize()? or other?) This > is especially pertinent because I am using lists/hash's, charts, and > RPC Services. > > I couldn't really find any documentation regarding clean-up and memory > leaks. Does anyone out there have any experiences/knowledge to share? > > Below, I'll outline my architecture, and note that I have no > cleanup/de-construction code right now at all, other than setting > variable references to new objects or null. Sorry it's pretty long, so > if you want to stop reading here and provide any ideas you have, feel > free =) > > thanks, > Thunder > _____________ > > > Basically I am running dynamic DB queries through a singleton > RemoteObject called by a "ChartResults" class that holds the results > (e4x XML) of the query and metadata info related to it. I have > employed the "Asynchronous Completion Token" documented approach to > allow the ChartResults classes to pick out only their calls from the > singleton R.O. > Is this detrimental to performance if there are anywhere from 4-10 SQL > calls possibly going through the one RemoteObject? (note - that's an > upper limit during initial startup only) > > The ChartResults class caches information as it is retrieved from the > results (often after performing filtering/sorting, etc). > > When a new query result comes in, the I clear all the cache > items by setting the hash objects or Array to null or new Object/Array > respectively. > > 1 - Does setting a property referencing a Collection to null also > release the source Array held in it? > > 2 - Do I also need to set each item in the Array to null? > > 3 - If a hash Object had many different XMLList properties cached, > do I need to iterate and null all these properties using introspection? > > Also, on the Chart side, I have been deleting the series array and > creating a new one when re-populating the chart (if it is showing > entirely new/different data). > > 4 - Do I need to do any cleanup of the series items maybe? > > 5 - Are the Series getting cleaned up and releasing their dataProvider > objects? > > Somewhere I am leaking memory badly as the number of chart queries > goes up and up... > > Thanks again! > Thunder > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

