Well, well. Indeed, it does work. I tried unLoad, which purports to do the same thing, with no result, but unLoadMember does the trick.
In fact, I did a little experimenting, and came up with an even simpler script which seems to work as well: on mUnloadMembers me unloadMember end I think Mare remarked that unloadMember with an argument just marks the member for unloading. It appears you don't even have to do that. Thanks! Cordially, Kerry Thompson > I have my director project setup similar to what you have. > Everything is loaded and linked on the fly, and after > something is placed onto the stage, they are added to a > global list that stores all these members. During some > interval, I traverse through the list and call unload on each > member. In the past, this seems to work well. I took another > look today and noticed that the memory usage was still > creeping up. Rather than take the painful approach on > unlinking castlib, I experimented with unLoadMember without > any parameters, and this seems to work. > > to use your example, my code now looks like this: > > on mUnloadMembers me > if pMemberList.count > 0 then > repeat with i = 1 to pMemberList.count > pMemberList[i].unload() > end repeat > unLoadMember > end if > > pMemberList = [] > > This seems a much simpler and faster solution than relinking > castlibs. Maybe you could give it a try? [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
