| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -444,7 +444,7 @@ void UDPWrap::RecvStop(const FunctionCallbackInfo<Value>& args) { | |||
| 444 | 444 | ||
| 445 | 445 | ||
| 446 | 446 | void UDPWrap::OnSend(uv_udp_send_t* req, int status) { | |
| 447 | - SendWrap* req_wrap = static_cast<SendWrap*>(req->data); | ||
| 447 | + std::unique_ptr<SendWrap> req_wrap{static_cast<SendWrap*>(req->data)}; | ||
| 448 | 448 | if (req_wrap->have_callback()) { | |
| 449 | 449 | Environment* env = req_wrap->env(); | |
| 450 | 450 | HandleScope handle_scope(env->isolate()); | |
@@ -455,7 +455,6 @@ void UDPWrap::OnSend(uv_udp_send_t* req, int status) { | |||
| 455 | 455 | }; | |
| 456 | 456 | req_wrap->MakeCallback(env->oncomplete_string(), 2, arg); | |
| 457 | 457 | } | |
| 458 | - delete req_wrap; | ||
| 459 | 458 | } | |
| 460 | 459 | ||
| 461 | 460 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments