Typically, any code in which a resource resolver is not tied to a request, you will need to create/close.
So, for example, if you have a service running in the background; one thats maybe on a schedule.
There's no request whose resource-resolver you can re-use, so you create one manually directly from the factory for use by this service.
You will be responsible for closing this resource resolver/session.