core3-utils

@wixc3/patterns on Github

Home > @wixc3/patterns > Disposables

Disposables class

Signature:

export declare class Disposables 

Constructors

Constructor Modifiers Description
[(constructor)(name, initialGroups)](/core3-utils/patterns.disposables._constructor_.html) Constructs a new instance of the `Disposables` class

Methods

Method Modifiers Description
[add(name, disposable)](/core3-utils/patterns.disposables.add.html)
[add(options)](/core3-utils/patterns.disposables.add_1.html)
[dispose()](/core3-utils/patterns.disposables.dispose.html) Disposes all disposables in all groups one at the time, order based on constraints
[list()](/core3-utils/patterns.disposables.list.html)
[registerGroup(groupName, constraints)](/core3-utils/patterns.disposables.registergroup.html) register a new constrained disposal group
[registerGroupIfNotExists(groupName, constraints)](/core3-utils/patterns.disposables.registergroupifnotexists.html) register a new constrained disposal group if it doesn't exist ignore otherwise
[remove(disposable)](/core3-utils/patterns.disposables.remove.html) removes a disposable from all disposal group