Skip to content

Commit

Permalink
Update files/zh-cn/web/javascript/memory_management/index.md
Browse files Browse the repository at this point in the history
Co-authored-by: Yanko1013 <[email protected]>
  • Loading branch information
familyboat and Yanko1013 authored Oct 29, 2024
1 parent f0d69ab commit 3b0f8b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/zh-cn/web/javascript/memory_management/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,4 @@ const getImage = cached((url) => fetch(url).then((res) => res.blob()));
出于性能和安全考虑,不会保证何时调用回调,或者是否会调用。它应该仅用于清除——非关键的清除。有其他更确定的资源管理的方式,例如 [`try...finally`](/zh-CN/docs/Web/JavaScript/Reference/Statements/try...catch),总是会执行 `finally` 块。`WeakRef``FinalizationRegistry` 仅用于长时间运行的程序中的内存用量优化。
更多有关 [`WeakRef`](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakRef) and [`FinalizationRegistry`](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry) 的 API 的信息,参见对应的参考页面。
更多有关 [`WeakRef`](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakRef) [`FinalizationRegistry`](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry) 的 API 的信息,参见对应的参考页面。

0 comments on commit 3b0f8b4

Please sign in to comment.