Fabric: Virtual destructors for all abstract interface-like classes

Summary:
@public
Apparently, it's how it should be.

Reviewed By: rsnara

Differential Revision: D9631870

fbshipit-source-id: 46f58270104d699fbc9abe21062c12f791460536
This commit is contained in:
Valentin Shergin 2018-09-07 11:12:13 -07:00 committed by Facebook Github Bot
parent ca1e9032a4
commit a3954ed5cb
3 changed files with 9 additions and 5 deletions

View File

@ -18,10 +18,8 @@ namespace react {
* Abstract class for Scheduler's delegate. * Abstract class for Scheduler's delegate.
*/ */
class SchedulerDelegate { class SchedulerDelegate {
public: public:
virtual ~SchedulerDelegate() = default;
/* /*
* Called right after Scheduler computed (and laid out) a new updated version * Called right after Scheduler computed (and laid out) a new updated version
* of the tree and calculated a set of mutations which are suffisient * of the tree and calculated a set of mutations which are suffisient
@ -33,6 +31,8 @@ public:
* Called right after a new ShadowNode was created. * Called right after a new ShadowNode was created.
*/ */
virtual void schedulerDidRequestPreliminaryViewAllocation(ComponentName componentName) = 0; virtual void schedulerDidRequestPreliminaryViewAllocation(ComponentName componentName) = 0;
virtual ~SchedulerDelegate() noexcept = default;
}; };
} // namespace react } // namespace react

View File

@ -16,12 +16,14 @@ class ShadowTree;
* Abstract class for ShadowTree's delegate. * Abstract class for ShadowTree's delegate.
*/ */
class ShadowTreeDelegate { class ShadowTreeDelegate {
public:
public:
/* /*
* Called right after Shadow Tree commit a new state of the the tree. * Called right after Shadow Tree commit a new state of the the tree.
*/ */
virtual void shadowTreeDidCommit(const ShadowTree &shadowTree, const ShadowViewMutationList &mutations) = 0; virtual void shadowTreeDidCommit(const ShadowTree &shadowTree, const ShadowViewMutationList &mutations) = 0;
virtual ~ShadowTreeDelegate() noexcept = default;
}; };
} // namespace react } // namespace react

View File

@ -17,8 +17,8 @@ namespace react {
* Abstract class for UIManager's delegate. * Abstract class for UIManager's delegate.
*/ */
class UIManagerDelegate { class UIManagerDelegate {
public:
public:
/* /*
* Called right after the new/updated Shadow Node tree is constructed. * Called right after the new/updated Shadow Node tree is constructed.
* The tree is not layed out and not sealed at this time. * The tree is not layed out and not sealed at this time.
@ -31,6 +31,8 @@ public:
* instances. * instances.
*/ */
virtual void uiManagerDidCreateShadowNode(const SharedShadowNode &shadowNode) = 0; virtual void uiManagerDidCreateShadowNode(const SharedShadowNode &shadowNode) = 0;
virtual ~UIManagerDelegate() noexcept = default;
}; };
} // namespace react } // namespace react