# Are resource leaks unavoidable for canceled builds?

**URL:** <https://discuss.circleci.com/t/are-resource-leaks-unavoidable-for-canceled-builds/31220>\
**Category:** Bug Reports\
**Created:** [July 5, 2019, 12:52pm UTC](https://discuss.circleci.com/t/are-resource-leaks-unavoidable-for-canceled-builds/31220 "2019-07-05T12:52:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cowboyd](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cowboyd/32/15493_2.png) [@cowboyd](https://discuss.circleci.com/u/cowboyd)\
**Post date:** [July 5, 2019, 12:52pm UTC](https://discuss.circleci.com/t/are-resource-leaks-unavoidable-for-canceled-builds/31220/1 "2019-07-05T12:52:30Z")

</div>

Workflows/Jobs/etc… are stateful processes that can have any number of open resources.

These resources need to be closed whenever the job/workflow that contains it is closed, no matter what the circumstances, and _especially_ on cancellation. There are a number of open tickets on this.

[https://discuss.circleci.com/t/cancelled-build-post-hook-commands/5995](https://discuss.circleci.com/t/cancelled-build-post-hook-commands/5995)

[https://discuss.circleci.com/t/support-scriptable-teardown-section-in-circle-yml/1703](https://discuss.circleci.com/t/support-scriptable-teardown-section-in-circle-yml/1703)

[https://discuss.circleci.com/t/create-value-cancelled-for-run-s-when/12231](https://discuss.circleci.com/t/create-value-cancelled-for-run-s-when/12231)

None of which has any response. What’s the status?

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [July 5, 2019, 6:57pm UTC](https://discuss.circleci.com/t/are-resource-leaks-unavoidable-for-canceled-builds/31220/2 "2019-07-05T18:57:05Z")

</div>

Sounds like a good hook to have. Have a look at `circleci.com/ideas` to see if it has been proposed already - and if not, please do add an idea. The forum does not automatically funnel ideas into the pot, as far as I know.
