# Is there a node that could or should be used to "Stop flow", at the end?

**URL:** <https://discourse.nodered.org/t/is-there-a-node-that-could-or-should-be-used-to-stop-flow-at-the-end/79742>\
**Category:** General\
**Created:** [11 July 2023 16:36 UTC](https://discourse.nodered.org/t/is-there-a-node-that-could-or-should-be-used-to-stop-flow-at-the-end/79742 "2023-07-11T16:36:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hughsheehy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hughsheehy/32/58679_2.png) [@hughsheehy](https://discourse.nodered.org/u/hughsheehy)\
**Post date:** [11 July 2023 16:36 UTC](https://discourse.nodered.org/t/is-there-a-node-that-could-or-should-be-used-to-stop-flow-at-the-end/79742/1 "2023-07-11T16:36:54Z")

</div>

Perhaps another silly question. I have a bunch of flows that invoke multiple external APIs or databases, and which do not expect an immediate response. Hence, in the specific flows these API calls and database calls are kinda just hanging out there at the end of their branch.

Is there a flow that could/should be used to "stop" or "close" the flow? Does leaving them open or handing like that create any risk of memory leakage over time?

H

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 July 2023 17:24 UTC](https://discourse.nodered.org/t/is-there-a-node-that-could-or-should-be-used-to-stop-flow-at-the-end/79742/2 "2023-07-11T17:24:13Z")

</div>

Nope, just leave them hanging. A node with an output port with no wire connected won't do anything with the msg output. And once that node finishes processing an input msg, it should close down anything it needs too (if it doesn't, you will have a leak no matter what). Node.js (or more accurately the V8 JavaScript engine) takes care of recovering memory once variables have reached the end of their scope so the way that Node-RED is architected should take care of that for you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 September 2023 17:24 UTC](https://discourse.nodered.org/t/is-there-a-node-that-could-or-should-be-used-to-stop-flow-at-the-end/79742/3 "2023-09-09T17:24:40Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
