Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

View File

@@ -7,16 +7,21 @@ Internally creates a weak reference to the object, and forces garbage collection
## Example
```javascript
let reference = {};
(async function () {
let reference = {};
let isLeaking;
const detector = new LeakDetector(reference);
const detector = new LeakDetector(reference);
// Reference is held in memory.
console.log(detector.isLeaking()); // true
// Reference is held in memory.
isLeaking = await detector.isLeaking();
console.log(isLeaking); // true
// We destroy the only reference to the object.
reference = null;
// We destroy the only reference to the object.
reference = null;
// Reference is gone.
console.log(detector.isLeaking()); // false
// Reference is gone.
isLeaking = await detector.isLeaking();
console.log(isLeaking); // false
})();
```