Represents ownership of a resource.
If this object is garbage collected, or dispose() method is called – the associated resource is freed.
Example
// IGuard represents ownership of a registered resource. // Store the guard and call dispose() in stop() to unregister cleanly. constregistry = this.pluginSystem.findInterface( Editor.IContextActionRegistry.interfaceId ) asEditor.IContextActionRegistry; if (Editor.isNull(registry)) { console.log('IContextActionRegistry not available'); return; }
Represents ownership of a resource. If this object is garbage collected, or
dispose()method is called – the associated resource is freed.Example