Server-Side Communication ActionScript > SharedObject.purge

 

SharedObject.purge

Availability

Flash Communication Server MX.

Usage

SharedObject.purge(version)

Parameters

version A version number. All deleted data that is older than this version is removed.

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

This example deletes all properties of the myShared shared object that are older than the value of SharedObject.version - 3.

var myShared = SharedObject.get("foo", true);
myShared.lock();
myShared.purge(myShared.version - 3);
myShared.unlock();