Skip to main content

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​

ResourceType

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