SpinTheMic
Pro

Explain it in 60 seconds

WeakRef and FinalizationRegistry

Frontend Engineering · JavaScript Core · Experienced

What are WeakRef and FinalizationRegistry, and when should they be used?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • WeakRef holds object without preventing GC.
  • deref() may return undefined.
  • FinalizationRegistry callback after collection.
  • Timing unpredictable.
  • Use rarely (caches), not for core logic.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics