
134
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
SharedObject.close()
so.close()
Detaches a reference from a shared object. A call to the SharedObject.get() method returns a reference to a shared
object instance. The reference is valid until the variable that holds the reference is no longer in use and the script is
garbage collected. To destroy a reference immediately, you can call
SharedObject.close(). You can use
SharedObject.close() when you no longer want to proxy a shared object.
Availability
Flash Communication Server 1
Example
In the following example, so is attached as a reference to shared object foo. When you call so.close(), you detach
the reference
so from the shared object foo.
so = SharedObject.get("foo");
// Insert code here.
so.close();
See also
SharedObject.get()
SharedObject.commit()
so.commit([name])
Static; stores either a specific persistent shared object instance or all persistent shared object instances with an isDirty
property whose value is
true. Use this method if the SharedObject.autoCommit property is false and you need to
manage when a shared object is stored locally.
Availability
Flash Media Server 2
Parameters
name A string indicating the name of the persistent shared object instance to store. If no name is specified, or if an
empty string is passed, all persistent shared objects are stored. This parameter is optional.
Returns
A boolean value indicating success (true) or failure (false).
Example
The following code commits all dirty shared objects to local storage when the application stops:
application.onAppStop = function (info){
// Insert code here.
SharedObject.commit();
}
SharedObject.flush()
so.flush()
Comentários a estes Manuais