Programming

Programming questions? Ask a programmer for answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

I am looking for expert in java who can look into four five…

Customer Question
I am looking for expert...
I am looking for expert in java who can look into four five customized collection classes and let us know where is memory leak. I will send code to expert as followup
Submitted: 8 years ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Answered in 5 minutes by:
6/17/2010
Programmer: Kevin Bui, Computer Software Engineer replied 8 years ago
Kevin Bui
Kevin Bui, Computer Software Engineer
Category: Programming
Satisfied Customers: 108
Experience: 9+ years of experience and competitions in Assembly, C/C++, C#, and Java.
Verified
Hi,

Can you please post the files on wikisend.com? I can take a look and try to find them.



Regards,

Kevin
Ask Your Own Programming Question
Customer reply replied 8 years ago
Hi Kevin,
Here is download link

http://wikisend.com/download/930714/datastructure.rar

few details:
basically arraymap binaryNode and elements in our application keep on increasing and don't get garbage collected for some reason and eventually application goes out of memory after 7 to 8 hours

you should be able to write unit test to reproduce same behaviour

Regards,
Indu
Customer reply replied 8 years ago
Kevin,
Do you think you will be able to address this issue

Regards,
Indu
Programmer: Kevin Bui, Computer Software Engineer replied 8 years ago
I am taking a look at it right now!
Ask Your Own Programming Question
Customer reply replied 8 years ago
just checking .. thanks
Programmer: Kevin Bui, Computer Software Engineer replied 8 years ago
I believe here is your problem:



[CODE] public void destroy(BinaryNode node)
{
node = null;
}
[/CODE]



Java passes references by value as well, so the "node" reference in the function is actually a COPY of the original reference passed to it. That is, when you're setting it to null, the original reference will still NOT be null (and so the object will not be destroyed). This is a common caveat of the Java language :( Unfortunately, this means that you will need to set the original reference outside the function to null in order to destroy the object upon GC.
Ask Your Own Programming Question
Programmer: Kevin Bui, Computer Software Engineer replied 8 years ago
To demonstrate what I meant, here is a code example:


[CODE] public static void main(String[] args) {
Object o = new Object();
destroy(o);
System.out.printf("Object is%s null.\n", o == null ? "" : " NOT");
}

public static void destroy(Object o) {
o = null;
}
[/CODE]

As you can see, the output will be "Object is NOT null." even when we had set the object reference to null inside the destroy method.
Ask Your Own Programming Question
Customer reply replied 8 years ago
we are doing testing to see if that is the only problem to cause leak if not then we will provide you unit test to show exact problem later today. Thanks for your time so far
Programmer: Kevin Bui, Computer Software Engineer replied 8 years ago
No problem! Let me know if you need any further assistance!
Ask Your Own Programming Question
Customer reply replied 8 years ago
Hi Kevin,
We still have leak after updating destroy method.
We spent more time profiling but couldn't figure out so far why these objects are not getting GCed . Any other ideas..


Was this answer helpful?

How JustAnswer works

step-image
Describe your issueThe assistant will guide you
step-image
Chat 1:1 with a programmerLicensed Experts are available 24/7
step-image
100% satisfaction guaranteeGet all the answers you need
Ask Kevin Bui Your Own Question
Kevin Bui
Kevin Bui
Kevin Bui, Computer Software Engineer
Category: Programming
Satisfied Customers: 108
108 Satisfied Customers
Experience: 9+ years of experience and competitions in Assembly, C/C++, C#, and Java.

Kevin Bui is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

7,175 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

848 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
would like LogicPro: You have been hired to produce a report
would like LogicPro: You have been hired to produce a report for a marketing research company. Yellow Bird Marketing, Inc. has collected information from across the country regarding five different pr… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
what is does this segment of code means this.arr_pl.destroy_all(); this.arr_pl.provide
what is does this segment of code means this.arr_pl.destroy_all(); this.arr_pl.provide(num_cond); for (int i = 0;i < num_cond;i++) { this.arr_pl.add(new condition(i + 1)); } this.arr_tr.destroy_all… read more
TheDoctor
TheDoctor
Software Engineer
Master's Degree
893 satisfied customers
You have been tasked to develop an application that reads customer
You have been tasked to develop an application that reads customer information from a file to determine in which states you have customers. The file contains records with customer first name, customer… read more
unvadim
unvadim
Computer Software Engineer
Diplom
1,168 satisfied customers
Question #1 A teacher has five students who have taken four
Question #1 A teacher has five students who have taken four tests. The teacher uses a straight grading scale to assign a letter grade to a student, based on the average of his or her three best test s… read more
unvadim
unvadim
Computer Software Engineer
Diplom
1,168 satisfied customers
**FOR LOGIC PRO ONLY** Hello again. I need some assistance
**FOR LOGIC PRO ONLY** Hello again. I need some assistance with a Java Collections program.… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
For ATLPROG - Hello, I need you to design a Java application
For ATLPROG - Hello, I need you to design a Java application that uses Java Collections effectively to read up to 50 Integers from a text file and place them into a Java collection. The application sh… read more
ATLPROG
ATLPROG
Computer Software Engineer
Master's Degree
7,677 satisfied customers
Java program w/ commented code Details: You have been hired
Java program w/ commented code Details: You have been hired to produce a report for a marketing research company. Yellow Bird Marketing, Inc. has collected information from across the country regardin… read more
ATLPROG
ATLPROG
Computer Software Engineer
Master's Degree
7,677 satisfied customers
Design your own Java application that uses Java Collections
Design your own Java application that uses Java Collections effectively to read up to 50 Integers from a text file and place them into a Java collection. The application should then sort the collectio… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
For ATLProg Only... You have been hired to produce a report
For ATLProg Only... You have been hired to produce a report for a marketing research company. Yellow Bird Marketing, Inc. has collected information from across the country regarding five different pro… read more
ATLPROG
ATLPROG
Computer Software Engineer
Master's Degree
7,677 satisfied customers
I have a C++ program that needs to have a different driver
I have a C++ program that needs to have a different driver (main.cpp) integrated with 2 header and 2 .cpp files from another program into a working solution. As in the 2 header and 2 cpp files must wo… read more
Zabo04
Zabo04
Master\u0027s Student
Master\u0027s Degree
7 satisfied customers
Homework 4 Exercise 4.1 Design, implement and test a
Homework 4 Exercise 4.1 Design, implement and test a Java application using generics, Java Collection Framework (JCF) and JCF techniques for processing person names in the following way: 1. Read perso… read more
ATLPROG
ATLPROG
Computer Software Engineer
Master's Degree
7,677 satisfied customers
The following piece of code should be used to answer the questions
The following piece of code should be used to answer the questions below: public void Update() { char [] bstring = new char[2]; } public static main() { char [] astring new char[5]; int count = 5; Upd… read more
ATLPROG
ATLPROG
Computer Software Engineer
Master's Degree
7,677 satisfied customers
USE Java program w/ commented code You have been hired
USE Java program w/ commented code : You have been hired to produce a report for a marketing research company. Yellow Bird Marketing, Inc. has collected information from across the country regarding f… read more
ATLPROG
ATLPROG
Computer Software Engineer
Master's Degree
7,677 satisfied customers
answering the following questions 1. What are the variables
answering the following questions: 1. What are the variables created in the main() method? 2. Create an initial memory map for the variables in the main() method before the Update() method is called 3… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
Is there any way that i can closer manage the amount of memory
Is there any way that i can closer manage the amount of memory that java is allocating or something so it doesn't use up that much ram.… read more
Jim Clark
Jim Clark
Web Developer/Database Designer
Bachelor\u0027s Degree
273 satisfied customers
I hate to ask an old stupid question, but where do I find some
I hate to ask an old stupid question, but where do I find some code for a java pplet to send SMS messaging… read more
NeOh
NeOh
Software Engineer
Bachelor's Degree
682 satisfied customers
Looking for java expert who can look into few data structure
Looking for java expert who can look into few data structure customized classes and give his suggestion to rewrite these data structure collection classes for better performance and memory efficiency.… read more
Jim Clark
Jim Clark
Web Developer/Database Designer
Bachelor\u0027s Degree
273 satisfied customers
A teacher has five students who have taken four tests. The
A teacher has five students who have taken four tests. The teacher uses the following grading scale to assign a letter grade to a student, based on the average of his or her four test scores.(A=90-100… read more
Christie Wilson
Christie Wilson
Vocational, Technical or Trade Scho
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x