I have a library that allocates objects. In most cases these objects are never freed by the applications. Naturally, Coverity flags each and every use ...
I have a library that allocates objects. In most cases these objects are never freed by the applications. Naturally, Coverity flags each and every use ...
If I use FileSystems.getDefault().getPath() it holds resource at FileSystems.getDefault(). Few tools like sonar, coverity give high impact issues of r ...
In my old code, I often used the following constructor idiom for convenience: This leads to Eclipse warning me of a "Potential resource leak: '< ...
I have an application which leaks thousands of file descriptors. lsof shows many opened regular files, but in memory dump of the application I have no ...
The program works fine but it bothers me that it gives a warning and I can't understand why! After some tries, I realized that if I do myObj.close() ...
In vscode I get a warning saying that Scanner has a resource leak for scanning over a String, but String doesn't need to be closed, so why does vscode ...
I have a code that looks like this, I am confused whether there is actually connection leak is there or is this some false positive reporting. And, ...
I am investigating an abrupt memory hike happening in a java process. I see that the heap size is growing till 3-4 GB. Upon investigating, i see that ...
When run on the following code, Facebook's Infer tool gives the following output: Here is the code: It gives the same warning if the file pointe ...
Can one cause problems by prematurely releasing a Windows GDI object? With memory one can prematurely delete/free a buffer and cause very serious prob ...
I have a Java code that I have been testing, the code uses the scanner class without closing it. I know that this causes memory leaks and that the mem ...
With this code : Klocwork signals an Resource leak : Someone knows why ? @Sivanesh Waran Hello thanks for your help, but I tried different co ...
In the below code I have used BufferedReader and InputStreamReader inside the try and but veracode complains the security as Improper Resource Shutdo ...
I want to add "org.kohsuke" % "file-leak-detector" % "1.13" java agent to my sbt configuration. //plugins.sbt addSbtPlugin("com.lightbend.sbt" % "sb ...
We use Coverity to identify potential security and quality flaws in our Java code. In one of our unit tests, we have some testing that involves databa ...
When I do write this: I get "resource leak" error message. But when I do write this: It just does work. Why is there no resource leak when I de ...
Look like I have memory leak in project, and I was able to find 2 methods, where closable resources were created, but close method was never called. ...
Why I get 'Resource leak: '' ' error even when I use close() method in Java? I put the whole code and used comments where about where I get the error ...
I am writing a Java 7-compatible program in eclipse, and a part of the code I wrote says there is a memory leak. Here is my code: The parts between ...