MACROMEDIA FIREWORKS MX 2004-EXTENDING FIREWORKS Manual page 87

Extending fireworks
Hide thumbs Also See for FIREWORKS MX 2004-EXTENDING FIREWORKS:
Table of Contents

Advertisement

RPCMethods.RemoveFromAutoReleasePool()
Usage
RPCMethods.RemoveFromAutoReleasePool(proxyObject)
Arguments
proxyObject
The object to remove from the current pool.
Returns
Nothing.
Description
Removes an object from the current auto-release pool so that it can be used in another code block.
RPCMethods.ReleaseObject()
Usage
RPCMethods.ReleaseObject(Object)
Arguments
The name of the object to release from memory.
Object
Returns
Nothing.
Description
Releases an object from memory. This function searches the specified object and all its properties
for proxy objects. If proxy objects are found, they are released from memory.
Creating auto-release blocks
Rather than constantly tracking which objects to release and how to relase them, you can define
blocks of code where you access the Fireworks DOM. In these blocks of code, the ActionScript
stubs can keep track of all the proxy objects allocated. Then, at the end of the block of code, a
single command will automatically release all objects allocated in the block.
Here is an example:
RPCMethods.CreateAutoReleasePool();
var selObject = fw.selection.get(0);
RPCMethods.DestroyAutoReleasePool();
Calling the
CreateAutoReleasePool()
and calling the
DestroyAutoReleasePool()
between these two calls is released by calling
functions, you can write ActionScript code and not worry about memory management.
function marks the beginning of the auto-release block,
function marks the end. Any object allocated
DestroyAutoReleasePool()
. Using these two
Cross-product architecture
87

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FIREWORKS MX 2004-EXTENDING FIREWORKS and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Fireworks mx 2004

Table of Contents