We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3feaf3d commit 87e977aCopy full SHA for 87e977a
test/addons/uv-handle-leak/binding.cc
@@ -15,9 +15,16 @@ void CloseCallback(uv_handle_t* handle) {}
15
16
class ExampleOwnerClass {
17
public:
18
- virtual ~ExampleOwnerClass() {}
+ virtual ~ExampleOwnerClass();
19
};
20
21
+// Do not inline this into the class, because that may remove the virtual
22
+// table when LTO is used, and with it the symbol for which we grep the process
23
+// output in test/abort/test-addon-uv-handle-leak.
24
+// When the destructor is not inlined, the compiler will have to assume that it,
25
+// and the vtable, is part of what this compilation unit exports, and keep them.
26
+ExampleOwnerClass::~ExampleOwnerClass() {}
27
+
28
ExampleOwnerClass example_instance;
29
30
void LeakHandle(const FunctionCallbackInfo<Value>& args) {
0 commit comments