At 19:10 -0500 17/01/02, Genevieve Young wrote:

>In creating MIAWs, there isn't a limit on the number of MIAWs I can 
>call and create?

Memory must be allocated for a MIAW, so that puts a limit on the 
number of concurrent MIAWs.

>I can also use a MIAW to call another?

Dunno', could imagine some pitfalls, maybe someone else have been there?
If that *is* a problem, then maybe it would be a safer strategy to 
let the first MIAW give the task to the stage, and let the stage 
handle it asynchronously, by using flags or timeoutobjects (or the 
actorList).

>And when I have finished  with the movie I not only close it, I also 
>use the forget command.
>Yet, why is Director  out of memory after I have barely opened / 
>closed three or four of these?

Yes, but bear in mind that 'forget' does not necessarily "release" the MIAW.
Forgetting a MIAW does two things:
1: Remove the reference from the windowlist
2: make the MIAW invisible

Under "normal" circumstances, ie: with the only reference to the 
MIAW, being the one in the windowList, the removal of that reference 
*will* release the MIAW, but if you have any other reference to the 
MIAW, it will still be alive, and perfectly ready to use (if you can 
still get to a reference, otherwise you'll just have big leak).

>Where did I go wrong? What else do I debug?

There is a way to see if a MIAW is still alive:
You make a global object, and stash a reference to it somewhere 
inside the MIAW, for instance as a property of a script (not an 
instance).
Then you watch this object in the watcher, and pay special attention 
to the "refCount", which is the second last number in the 
object-reference-string-presentation, ie:

<offspring "myScript" 2 7a32b6c>

Is an object with refCount 2

Now if the MIAW is released that number should drop by one. If it 
doesn't, it means that you still have other references to the MIAW, 
and it has not been released, "garbage collected".

Did you anywhere do something like:
theMiaw = window "myMiawMovie"
Or:
thisWindow = the activeWindow

If so, and these variables are stored somewhere, then you need to 
clear those variables.

HTH, Jakob
[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