Skip to content

Commit

Permalink
chore: setting py obj to None may not destruct the object
Browse files Browse the repository at this point in the history
  • Loading branch information
kthui committed Dec 10, 2024
1 parent 2082a3c commit d053a3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pb_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1032,9 +1032,9 @@ Stub::~Stub()

{
py::gil_scoped_acquire acquire;
async_event_loop_ = py::none();
background_futures_ = py::none();
model_instance_ = py::none();
py::object async_event_loop_local(std::move(async_event_loop_));
py::object background_futures_local(std::move(background_futures_));
py::object model_instance_local(std::move(model_instance_));
}
stub_instance_.reset();
stub_message_queue_.reset();
Expand Down

0 comments on commit d053a3d

Please sign in to comment.