Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit acf3f09

Browse files
authoredMar 15, 2025··
Sumary clarification
1 parent 3d7abb9 commit acf3f09

File tree

1 file changed

+4
-4
lines changed
  • 1-js/99-js-misc/07-weakref-finalizationregistry

1 file changed

+4
-4
lines changed
 

‎1-js/99-js-misc/07-weakref-finalizationregistry/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ You can [open this example in the sandbox](sandbox:weakref-finalizationregistry)
476476
477477
## Summary
478478
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.
481481
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

Comments
 (0)
Please sign in to comment.