User Guide

SharedObject class 135
Returns
Nothing.
Description
Method; causes the server to purge all deleted properties that are older than the specified
version. Although you can also accomplish this task by setting the
SharedObject.resyncDepth property, the SharedObject.purge() method gives the script
more control over which properties to delete.
Example
The following example deletes all the properties of the myShared shared object that are older
than the value of
myShared.version - 3:
var myShared = SharedObject.get("foo", true);
myShared.lock();
myShared.purge(myShared.version - 3);
myShared.unlock();
SharedObject.resyncDepth
Availability
Flash Communication Server MX 1.0.
Usage
mySO.resyncDepth
Description
Property; an integer that indicates when the deleted properties of a shared object should be
permanently deleted. You can use this property in a server-side script to resynchronize shared
objects and to control when shared objects are deleted. The default value is infinity.
If the current revision number of the shared object minus the revision number of the deleted
property is greater than the value of
SharedObject.resyncDepth, the property is deleted.
Also, if a client connecting to this shared object has a client revision that, when added to the
value of
SharedObject.resyncDepth is less than the value of the current revision on the
server, all the current elements of the client shared object are deleted, the valid properties are
sent to the client and the client receives a “clear” message.