Merge "remove manually freeing the variable mDeathRecipient" into main

This commit is contained in:
Zhanglong Xia
2023-08-24 09:18:59 +00:00
committed by Gerrit Code Review
2 changed files with 1 additions and 5 deletions

View File

@@ -59,10 +59,6 @@ ThreadChip::ThreadChip(char* url) : mUrl(), mRxFrameBuffer(), mCallback(nullptr)
AIBinder_DeathRecipient_setOnUnlinked(mDeathRecipient.get(), ThreadChip::onBinderUnlinkedJump);
}
ThreadChip::~ThreadChip() {
AIBinder_DeathRecipient_delete(mDeathRecipient.get());
}
void ThreadChip::onBinderDiedJump(void* context) {
reinterpret_cast<ThreadChip*>(context)->onBinderDied();
}

View File

@@ -34,7 +34,7 @@ namespace threadnetwork {
class ThreadChip : public BnThreadChip, ot::Posix::Mainloop::Source {
public:
ThreadChip(char* url);
~ThreadChip();
~ThreadChip() {}
ndk::ScopedAStatus open(const std::shared_ptr<IThreadChipCallback>& in_callback) override;
ndk::ScopedAStatus close() override;