You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/99-js-misc/07-weakref-finalizationregistry/article.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -476,8 +476,8 @@ You can [open this example in the sandbox](sandbox:weakref-finalizationregistry)
476
476
477
477
## Summary
478
478
479
-
`WeakRef` - designed to create weak references to objects, allowing them to be deleted from memory by the garbage collector if there are no longer strong references to them.
480
-
This is beneficial for addressing excessive memory usage and optimizing the utilization of system resources in applications.
479
+
`WeakRef` -- designed to create weak references to objects, allowing the JavaScript engine to remove them from memory when no strong references remain.
480
+
This helps optimize memory and system resource usage automatically.
481
481
482
-
`FinalizationRegistry` - is a tool for registering callbacks, that are executed when objects that are no longer strongly referenced, are destroyed.
483
-
This allows releasing resources associated with the object or performing other necessary operations before deleting the object from memory.
482
+
`FinalizationRegistry` -- is a tool for registering callbacks that are executed when an object without strong references is deleted.
483
+
This allows the programmer manually release resources associated with the object or perform additional cleanup tasks before the object is fully removed from memory.
0 commit comments