JavaScript Professional — Hard
Key points
- WeakRef allows objects to be garbage collected when no longer needed
- deref() returns the object if it hasn't been collected
- Setting obj to null does not guarantee immediate garbage collection
Ready to go further?
Related questions
