From acf3f09cc59b59ade79c226d7afedad42dcea535 Mon Sep 17 00:00:00 2001 From: joaquinelio Date: Sat, 15 Mar 2025 04:43:38 -0300 Subject: [PATCH] Sumary clarification --- .../99-js-misc/07-weakref-finalizationregistry/article.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/1-js/99-js-misc/07-weakref-finalizationregistry/article.md b/1-js/99-js-misc/07-weakref-finalizationregistry/article.md index 777bf703ce..31ab6e309d 100644 --- a/1-js/99-js-misc/07-weakref-finalizationregistry/article.md +++ b/1-js/99-js-misc/07-weakref-finalizationregistry/article.md @@ -476,8 +476,8 @@ You can [open this example in the sandbox](sandbox:weakref-finalizationregistry) ## Summary -`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. -This is beneficial for addressing excessive memory usage and optimizing the utilization of system resources in applications. +`WeakRef` -- designed to create weak references to objects, allowing the JavaScript engine to remove them from memory when no strong references remain. +This helps optimize memory and system resource usage automatically. -`FinalizationRegistry` - is a tool for registering callbacks, that are executed when objects that are no longer strongly referenced, are destroyed. -This allows releasing resources associated with the object or performing other necessary operations before deleting the object from memory. \ No newline at end of file +`FinalizationRegistry` -- is a tool for registering callbacks that are executed when an object without strong references is deleted. +This allows the programmer manually release resources associated with the object or perform additional cleanup tasks before the object is fully removed from memory.