| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3684fd1 commit aecc77b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5119,6 +5119,11 @@ invocation. If it is deleted before then, then the finalize callback may never | |||
| 5119 | 5119 | be invoked. Therefore, when obtaining a reference a finalize callback is also | |
| 5120 | 5120 | required in order to enable correct disposal of the reference. | |
| 5121 | 5121 | ||
| 5122 | + Finalizer callbacks may be deferred, leaving a window where the object has | ||
| 5123 | + been garbage collected (and the weak reference is invalid) but the finalizer | ||
| 5124 | + hasn't been called yet. When using `napi_get_reference_value()` on weak | ||
| 5125 | + references returned by `napi_wrap()`, you should still handle an empty result. | ||
| 5126 | + | ||
| 5122 | 5127 | Calling `napi_wrap()` a second time on an object will return an error. To | |
| 5123 | 5128 | associate another native instance with the object, use `napi_remove_wrap()` | |
| 5124 | 5129 | first. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments