Results 1 to 4 of 4
- 07-10-2012, 10:39 PM #1
Member
- Join Date
- Jul 2012
- Posts
- 1
- Rep Power
- 0
Resource leak on eclipse. How to fix?
Hello, I'm a total beginner and am following along these video lessons http://www.youtube.com/watch?v=ANuuS...hannel&list=UL and I'm getting a Resource leak error on line 4. What am I doing wrong?
Java Code:import java.util.Scanner; class Cal{ public static void main(String [] args){ Scanner bucky = new Scanner(System.in); double fnum, snum, answer; System.out.println("enter first num: "); fnum = bucky.nextDouble(); System.out.println("Enter your second number: "); snum = bucky.nextDouble(); answer = fnum + snum; System.out.println(answer); } }
Last edited by JosAH; 07-11-2012 at 10:49 AM. Reason: added [code] ... [/code] tags
- 07-10-2012, 10:48 PM #2
Member
- Join Date
- Jul 2012
- Location
- Zuid-Holland, The Netherlands
- Posts
- 16
- Rep Power
- 0
Re: Resource leak on eclipse. How to fix?
I'm not having any errors when trying to run this. So at least it's not the code that's wrong.
As I'm not really good at explaining stuff, I've got both a link and a copied piece of text for you:
"unintentional maintenence of references to non-memory resources" - What is a resource leak?
- 07-11-2012, 10:05 AM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 28
Re: Resource leak on eclipse. How to fix?
Please use [code] tags [/code] when posting code.
Also please post the full error and any stack trace and highlight the line it occurs on.Please do not ask for code as refusal often offends.
** This space for rent **
- 07-12-2012, 02:29 PM #4
Member
- Join Date
- Jun 2012
- Location
- Ohio
- Posts
- 10
- Rep Power
- 0
Similar Threads
-
avoid memory leak
By Sergey Livanov in forum Advanced JavaReplies: 10Last Post: 12-20-2011, 04:10 PM -
Memory leak in swing
By smeshram in forum AWT / SwingReplies: 7Last Post: 12-08-2011, 03:52 AM -
Memory Leak questions, code review
By mensaFool in forum Advanced JavaReplies: 9Last Post: 03-08-2010, 04:27 PM -
Socket Class Leak
By mbmsit in forum NetworkingReplies: 3Last Post: 02-20-2010, 12:09 PM -
Help I have a memory leak...
By cdman52 in forum Java AppletsReplies: 10Last Post: 09-28-2009, 10:37 PM
Bookmarks