User Guide

438 Chapter 21: Managing Memory
Monitoring memory use
The Memory inspector displays information about how much memory is available to Director for
your movie and indicates how much memory different parts of the current movie use and the
total disk space the movie occupies. It also can purge all removable items from RAM if you are
about to perform a memory-intensive operation.
Note: The Memory inspector is not available on Macintosh.
To use the Memory inspector:
1 Select Window > Memory Inspector.
2 Observe the following memory use indicators:
Total Memory displays the total system memory available, including the amount of RAM
installed on your computer and any available virtual memory.
Physical Memory shows the amount of actual RAM installed in the system.
Total Used indicates how much RAM is being used for a movie.
Free Memory indicates how much more memory is currently available in your system.
Other Memory indicates the amount of memory used by other applications.
Used by Program indicates the amount of memory used by Director (excluding the amount
of memory used by the Director application file).
Cast & Score indicates the amount of memory used by the cast members in the Cast window
and the notation in the Score window. Cast members include all the artwork in the Paint
window, all the text in the Text windows, cast members that use the Matte ink in the Score,
thumbnail images in the Cast window, and any sounds, palettes, buttons, digital video movies,
or linked files that are imported into the cast and are currently loaded into memory.
Screen Buffer shows how much memory Director reserves for a working area while executing
animation on the Stage.
3 To remove all items that can be purged from RAM, including all thumbnail images in the Cast
window, click Purge.
All cast members that have Unload (purge priority) set to a priority other than 0–Never (as
specified in the Property inspector’s Member tab) are removed from memory. This procedure is
useful for gaining as much memory as possible before importing a large file. Edited cast
members are not purged.
Whenever Director runs low on memory, such as when trying to load many large cast members,
other cast members are automatically unloaded from memory, according to the following rules:
The first cast members to be unloaded are those that have a purgePriority value of 3. This
type of discarding is fast but is essentially random, which means you cannot predict which of
these cast members unload at any given time. The worst-case scenario is that in order to load
the cast member for channel 1 of a particular frame, the cast member that is needed for
channel 2 of that same frame gets unloaded.
When there are no more cast members with a purgePriority value of 3 left to unload,
Director starts unloading the cast members that have a purgePriorty value of 2 and were least
recently used. This type of unloading is slower but can be more predictable.
If more memory is still needed after the cast members with a purgePriority value of 2
are unloaded, then the least recently used cast members with a purgePriority value of 1
are unloaded.