Comments (7)
Right, my bad. What you need to do is find where the IS is used and add a stream.close() in a finally. Then submit a PR. :)
On Aug 4, 2014, at 5:02 PM, freddag [email protected] wrote:
hi i found a resource leak on the line "is = new FileInputStream(file);" in context below i dont know enough about it but it seems that is can cause quite abit of lag over time. the finally staement at the end apears to not end normally.
public InputStream getStreamForFile(File file) {
InputStream is = null;
try {
is = new FileInputStream(file);
} catch (FileNotFoundException e) {
e.printStackTrace();
} finally {
return is;
}
}cheers freddag
—
Reply to this email directly or view it on GitHub.
from developercapes.
I am unable to find where I need to put stream.close(); the statement that is using it is the one from the bug report submit above that particular method doesn't get called any where that I can find and when I do put it in the finally statement for that method I get the error "stream cant be resolved." I have no idea sorry I am new to coding and don't know a huge amount of advanced stuff yet still learning.
cheers freddag
from developercapes.
if it is not used within the API then this should be closed as there is no resource leak, the person calling the method should know that they have to close it. Although it might seem redundant to those that understand that much, we might want to specify that the caller needs to close it themselves.
from developercapes.
Yah, I just forgot to close it. We can add that to the docs.
On Aug 4, 2014, at 6:37 PM, Captain Shadows [email protected] wrote:
if it is not used within the API then this should be closed as there is no resource leak, the person calling the method should know that they have to close it. Although it might seem redundant to those that understand that much, we might want to specify that the caller needs to close it themselves.
—
Reply to this email directly or view it on GitHub.
from developercapes.
i guess this can be closed then. i dont see it effecting the use of the api/library
from developercapes.
It should be fixed now.
from developercapes.
cheers =)
great api you have made looking forward to using it =)
from developercapes.
Related Issues (20)
- Capes causing Multiplayer to crash. HOT 5
- Odd variable name issue HOT 4
- DevCapes not working on Forge Build 9.10.1.858 HOT 1
- Multiplayer crashes when I use V2.1 of DevCapes HOT 5
- New JSON cape config. HOT 8
- Capes not showing up. HOT 12
- DevCapes Does not work with the latest forge version HOT 10
- DevCapes standalone 1.7
- Errors on Minecraft Forge build 1186 for 1.7.10 HOT 3
- Capes not working at all HOT 8
- HD Cape Resolution HOT 8
- Error on mod load HOT 74
- Clean up javadoc HOT 57
- 1.8? HOT 1
- Blank cape HOT 3
- CapeConfig Could Not Be Parsed
- cape not showing up (java.lang.NoSuchFieldException: playerInfo) HOT 18
- Error parsing cape
- 1.6.2? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from developercapes.