Skip to content

Commit

Permalink
fix(core): fix turbo memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
etkmao committed Oct 18, 2024
1 parent 6b8952a commit f35a73f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/include/core/napi/v8/js_native_turbo_v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class V8TurboEnv : public TurboEnv {

private:
struct IHostProxy {
virtual ~IHostProxy() {}
virtual void Destroy() = 0;
};

Expand All @@ -61,6 +62,8 @@ class V8TurboEnv : public TurboEnv {
is_reset_ = true;
if (host_proxy_) {
host_proxy_->Destroy();
delete host_proxy_;
host_proxy_ = nullptr;
}
if (!object_tracker_.IsEmpty()) {
object_tracker_.Reset();
Expand Down

0 comments on commit f35a73f

Please sign in to comment.