At least in some languages this is not an issue if one is able to use higher order functions, with bonus points if they allow for trailing lambdas.
So if it is possible to organize the application architecture as regions where the resources are supposed to be valid, then one can manually get rid of such resources.
Of course, this might not always be possible, and there is the caveat that one needs to remember to apply such patterns.
Which is easier if it can be imposed via the type system.