Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 694B

123456789101112131415161718192021222324252627
  1. # jest-leak-detector
  2. Module for verifying whether an object has been garbage collected or not.
  3. Internally creates a weak reference to the object, and forces garbage collection to happen. If the reference is gone, it meant no one else was pointing to the object.
  4. ## Example
  5. ```javascript
  6. (async function () {
  7. let reference = {};
  8. let isLeaking;
  9. const detector = new LeakDetector(reference);
  10. // Reference is held in memory.
  11. isLeaking = await detector.isLeaking();
  12. console.log(isLeaking); // true
  13. // We destroy the only reference to the object.
  14. reference = null;
  15. // Reference is gone.
  16. isLeaking = await detector.isLeaking();
  17. console.log(isLeaking); // false
  18. })();
  19. ```