Skip to content

Commit

Permalink
Mark dtor as virtual (#36932)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #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
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Apr 18, 2023
1 parent 7495883 commit 64e789e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
*/
Expand Down

0 comments on commit 64e789e

Please sign in to comment.