Mark dtor as virtual (#36932)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36932

changelog: [internal]

ShadowNode must have its destructor as virtual because it is a base class and is used polymorphically. It is deleted through a pointer.

Reviewed By: nlutsenko

Differential Revision: D45045682

fbshipit-source-id: 882d06d2ab200c201acc09693cb982561e908859
This commit is contained in:
Samuel Susla
2023-04-18 08:31:17 -07:00
committed by Facebook GitHub Bot
parent 749588313e
commit 64e789e1e5
@@ -91,6 +91,8 @@ class ShadowNode : public Sealable,
ShadowNode(ShadowNode const &shadowNode) noexcept = delete;
ShadowNode &operator=(ShadowNode const &other) noexcept = delete;
virtual ~ShadowNode() override = default;
/*
* Clones the shadow node using stored `cloneFunction`.
*/