Cross-product architecture
87
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
Object
The name of the object to release from memory.
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()
function marks the beginning of the auto-release block,
and calling the
DestroyAutoReleasePool()
function marks the end. Any object allocated
between these two calls is released by calling
DestroyAutoReleasePool()
. Using these two
functions, you can write ActionScript code and not worry about memory management.
Summary of Contents for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER
Page 1: ...Extending Fireworks...
Page 4: ...4 Contents...
Page 8: ...8 Chapter 1 Extending Fireworks Overview...
Page 102: ...102 Chapter 4 Auto Shapes...