register
FitFileViewer - API Documentation v29.4.0
FitFileViewer - API Documentation / utils/app/lifecycle/resourceManager / register
Variable: register()
register: (
type:ResourceType,cleanup:Function,options?: {owner?:string;instance?:any;id?:string; }) =>string
Defined in: utils/app/lifecycle/resourceManager.js:446
Register a new resource for automatic cleanup
Parametersβ
typeβ
Type of resource
cleanupβ
Function
Cleanup function to call when resource is released
options?β
Optional configuration
owner?β
string
Owner/component identifier
instance?β
any
Reference to the resource instance
id?β
string
Custom ID (auto-generated if not provided)
Returnsβ
string
Resource ID for later cleanup