Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

close resourceResolver

Avatar

Level 2

Hi,

I know that you are supposed to close any resource resolvers you create. My question is if you do something like this:

Resource myResource = resourceResolver.getResource(<path>);

Do you still need to close that resourceResolver to clean up system resources and if so how?

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hello,

No. In theory you only have to close resource resolver (Or admin session) if you are creating one using dependency injection or through service.

Yogesh

View solution in original post

1 Reply

Avatar

Correct answer by
Level 5

Hello,

No. In theory you only have to close resource resolver (Or admin session) if you are creating one using dependency injection or through service.

Yogesh