Skip to main content

%OnClose()

%OnClose()

This instance method is called immediately before an object is destructed, thereby providing the user with an opportunity to perform operations on any ancillary items, such as releasing locks or removing temporary data structures.

Its signature is:

Method %OnClose() As %Status [ Private, ServerOnly = 1 ]
{
    // body of method here...
}

The method returns a %StatusOpens in a new tab code, where a failure status is only informational and does nothing to prevent the object from being destructed.

Subclasses of %Library.RegisteredObjectOpens in a new tab have the option of overriding this method.

FeedbackOpens in a new tab