Home > @wixc3/patterns > Disposables
Signature:
export declare class Disposables
Constructor | Modifiers | Description |
---|---|---|
[(constructor)(name, initialGroups)](/core3-utils/patterns.disposables._constructor_.html) | Constructs a new instance of the `Disposables` class |
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 |