NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

requested garbage collection

 
Post new topic   Reply to topic    NetBeans Forums -> Profiler Users
View previous topic :: View next topic  
Author Message
19aeg19



Joined: 20 Apr 2017
Posts: 2

PostPosted: Thu Apr 20, 2017 5:35 pm    Post subject: requested garbage collection Reply with quote

Hello! I am new to the NetBeans Profiler. I am using it to look for memory leaks in a large project, about 10,000 src files. I have found a handful of classes where the Generations metric is growing pretty large, around 50 Generations after 30 minutes. I assume garbage collections are happening at some regular interval because the generations metric seems to be increasing at a steady rate. I am confused about what happens when I use the garbage icon to request garbage collection. The generations metric goes down significantly. If I can force the generations metric to go down by requesting garbage collection, does that indicate that I do not have a memory leak from those classes? I don't understand the difference between when I request the garbage collection vs when it is happening automatically. I appreciate any thoughts! Thank you!
Back to top
Tomas Hurka
Posted via mailing list.





PostPosted: Fri Apr 21, 2017 1:37 pm    Post subject: requested garbage collection Reply with quote

Quote:
On 20 Apr 2017, at 19:35, 19aeg19 <address-removed ([email]address-removed[/email])> wrote:
Hello! I am new to the NetBeans Profiler. I am using it to look for memory leaks in a large project, about 10,000 src files. I have found a handful of classes where the Generations metric is growing pretty large, around 50 Generations after 30 minutes. I assume garbage collections are happening at some regular interval because the generations metric seems to be increasing at a steady rate. I am confused about what happens when I use the garbage icon to request garbage collection. The generations metric goes down significantly. If I can force the generations metric to go down by requesting garbage collection, does that indicate that I do not have a memory leak from those classes?

Right.
Quote:
I don't understand the difference between when I request the garbage collection vs when it is happening automatically. I appreciate any thoughts!

When your application is running, you probably see just minor GC, because there is no memory pressure. When you request GC, full GC is invoked. It looks like your objects survive minor GCs, but are released when full GC is invoked.

Bye,
--Tomas Hurka <mailto:address-removed ([email]address-removed[/email])>NetBeans Profiler http://profiler.netbeans.orgVisualVM http://visualvm.github.ioSoftware DeveloperOracle, Praha Czech Republic
Back to top
19aeg19



Joined: 20 Apr 2017
Posts: 2

PostPosted: Fri Apr 21, 2017 1:45 pm    Post subject: Reply with quote

Thank you for your response! I can see I have some reading about GC to do!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Profiler Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo