logo separator

[mkgmap-dev] Resource leaks

From Steve Ratcliffe steve at parabola.me.uk on Tue May 6 19:24:47 BST 2014

Hi

> Eclipse complains about a lot places in the source code., e.g.
> "Resource leak: 'fmt' is never closed    SyntaxException.java
> /mkgmap/src/uk/me/parabola/mkgmap/scan    line 45    Java Problem"
>
> The code looks like this:
>
>      public String getMessage() {
>          Formatter fmt = new Formatter();

In this case it writes to a StringBuilder. This is not even a
Closable, so the close() method of Formatter does nothing
in this case.

So nothing is being leaked.

..Steve


More information about the mkgmap-dev mailing list