UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

92 lines (42 loc) 1.1 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [ReferenceCounter](./rc-js-util.referencecounter.md) ## ReferenceCounter class Weak reference counter. **Signature:** ```typescript export declare class ReferenceCounter<TKey extends object> ``` ## Constructors <table><thead><tr><th> Constructor </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [(constructor)(onZeroReference)](./rc-js-util.referencecounter._constructor_.md) </td><td> </td><td> Constructs a new instance of the `ReferenceCounter` class </td></tr> </tbody></table> ## Methods <table><thead><tr><th> Method </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [add(key)](./rc-js-util.referencecounter.add.md) </td><td> </td><td> </td></tr> <tr><td> [remove(key)](./rc-js-util.referencecounter.remove.md) </td><td> </td><td> </td></tr> </tbody></table>