| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1b277d9 commit 9b6512f
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -220,6 +220,8 @@ class RefBase : protected Finalizer, RefTracker { | |||
| 220 | 220 | finalize_hint); | |
| 221 | 221 | } | |
| 222 | 222 | ||
| 223 | + virtual ~RefBase() { Unlink(); } | ||
| 224 | + | ||
| 223 | 225 | inline void* Data() { | |
| 224 | 226 | return _finalize_data; | |
| 225 | 227 | } | |
@@ -240,7 +242,6 @@ class RefBase : protected Finalizer, RefTracker { | |||
| 240 | 242 | // the finalizer and _delete_self is set. In this case we | |
| 241 | 243 | // know we need to do the deletion so just do it. | |
| 242 | 244 | static inline void Delete(RefBase* reference) { | |
| 243 | - reference->Unlink(); | ||
| 244 | 245 | if ((reference->RefCount() != 0) || | |
| 245 | 246 | (reference->_delete_self) || | |
| 246 | 247 | (reference->_finalize_ran)) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,11 +1,9 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | const common = require('../../common'); | |
| 3 | 3 | ||
| 4 | - // TODO(addaleax): Run this test once it stops failing under ASAN/valgrind. | ||
| 5 | 4 | // Refs: https://github.com/nodejs/node/issues/34731 | |
| 6 | 5 | // Refs: https://github.com/nodejs/node/pull/35777 | |
| 7 | 6 | // Refs: https://github.com/nodejs/node/issues/35778 | |
| 8 | - common.skip('Reference management in N-API leaks memory'); | ||
| 9 | 7 | ||
| 10 | 8 | const { Worker, isMainThread } = require('worker_threads'); | |
| 11 | 9 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments