I think this has been discussed before, but I can't find it in the
archives.

I need to unload members from memory, and unloadMember doesn't seem to
be working. Dir MX, Win XP Pro and Mac OS X (Panther).

My program is mostly code. I have a number of zero-pixel holder sprites
that I load members into as I need them. Any kind of member--video,
audio, text, graphics, and so on.

If I don't actively manage the unloading, the memory usage quickly
climbs until things stop working.

So I put in some code to unload an activity's assets when I leave that
activity. It's in an object, and here's the relevant code:

on mUnloadMembers me
  if pMemberList.count > 0 then
    repeat with i = 1 to pMemberList.count
      pMemberList[i].unload()
    end repeat
  end if
  
  pMemberList = []
end unloadMembers

I've checked, and the list contains the members I want to unload. For
example, I'm at a break point in the debugger, and pMemberList[i] is
(member 28 of castLib 4).

But memory usage continues to climb as fast as if I weren't doing
anything. I check the loaded property of the member in the debugger, and
it stays true even after it has been specifically unloaded.

This isn't a code memory leak--in the memory inspector, the "Used by
Program" memory stays pretty constant. The "Cast and Score" memory is
what's killing me.

Any ideas? How can I _really_ unload cast members?

Cordially,

Kerry Thompson


[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!]

Reply via email to