Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

há 3 anos
12345678910111213141516171819202122
  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. let reference = {};
  7. const detector = new LeakDetector(reference);
  8. // Reference is held in memory.
  9. console.log(detector.isLeaked()); // true
  10. // We destroy the only reference to the object.
  11. reference = null;
  12. // Reference is gone.
  13. console.log(detector.isLeaked()); // false
  14. ```