Understanding `Effect.scoped` in HTTP Data Decoding with Schema

In the example for how to fetch and decode data with Schema with the HttpClient https://github.com/Effect-TS/effect/tree/main/packages/platform#decoding-data-with-schemas it is shown how it is necessary to use Effect.scoped.

The example is great, it works and is easy to follow, but I don't quite understand what is meant with Note [...] Effect.scoped after consuming the response. This ensures that any resources associated with the HTTP request are properly cleaned up [...].

What HTTP resources are being "consumed" when decoding the data? What would be a more "complex" example that would show the need for Effect.scoped a bit more in-depth?
Was this page helpful?