broccolijs / broccoli

Browser compilation library – an asset pipeline for applications that run in the browser
https://broccoli.build
MIT License
3.33k stars 217 forks source link

Destructor Concept #479

Open stefanpenner opened 3 years ago

stefanpenner commented 3 years ago

Broccoli is missing a way to teardown/destroy/release broccoli pipelines and plugins.

Some plugins may have resources that must be cleaned up when the pipeline that plugin belongs too is shutdown. Many existing solutions simply cleanup naturally due to GC, but there exist advanced concepts which cannot be modeled in such a way, and those same concepts should not be constrained to broccoli core itself, but should be possible to accomplish from a plugin.