WALA icon indicating copy to clipboard operation
WALA copied to clipboard

Module should implement Closeable

Open sewe opened this issue 8 years ago • 2 comments

At the moment, there is no way for a Module to be closed properly, in order to release its resources. This is a problem at least for JarFileModule, as the underlying JarFile won’t be closed.

If backward compatibility with existing Module implementations is a concern (not sure if there are that many), a default close() method might be added.

sewe avatar Oct 17 '17 08:10 sewe

One thing that is IMHO important is that the WALA “framework” does not itself try to close() a Module itself when it thinks it is done with it. Instead, it should be the client’s obligation to do so, as only the client knows when he is done with the analysis. For example, a single Module may be reused by multiple analyses in different AnalysisScopes. Only when the last analysis is done, need the Module be closed.

sewe avatar Oct 17 '17 09:10 sewe

This is closely related to issue #236, or might even be the same thing.

liblit avatar Nov 27 '17 17:11 liblit