Skip to content

[SOT] Add more virtual destructor for virtual class #72306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion paddle/fluid/pybind/sot/guards.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ class DummyGuard : public GuardBase {
bool check(PyObject* value) override { return true; }
};

class GuardTreeNode {};
class GuardTreeNode {
public:
virtual ~GuardTreeNode() = default;
};

class AttributeExprNode;
class ItemExprNode;
Expand Down Expand Up @@ -353,6 +356,7 @@ class GuardNode : public GuardTreeNode {
exprs(exprs),
next_guard_nodes(next_guard_nodes),
return_cache_index(return_cache_index) {}
virtual ~GuardNode() = default;

std::optional<int> lookup(FrameProxy* frame);
};
Expand Down