| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,9 +15,16 @@ void CloseCallback(uv_handle_t* handle) {} | |||
| 15 | 15 | ||
| 16 | 16 | class ExampleOwnerClass { | |
| 17 | 17 | public: | |
| 18 | - virtual ~ExampleOwnerClass() {} | ||
| 18 | + virtual ~ExampleOwnerClass(); | ||
| 19 | 19 | }; | |
| 20 | 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 | + | ||
| 21 | 28 | ExampleOwnerClass example_instance; | |
| 22 | 29 | ||
| 23 | 30 | void LeakHandle(const FunctionCallbackInfo<Value>& args) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments