Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Originally posted by Paul Maeng:
hi guru,
Does anyone answer whether application java program can use Garbage collection,gc()in process?
I am trying to release the memory regurally in processing while executing the java application.
thanks for your comments,
Originally posted by Balasubramanian Chandrasekaran:
You can make your object references to be null after its usage which makes it available for Garbage Collection.Thats the best you can do.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Originally posted by William Brogden:
I know of one case in which it is reasonable for your application to call gc() - just after the program has filled the user's screen with information which you know will take some time to read and decide on the next step.
Any delay at that point will not be noticable, and presumably you have released all the temporary objects that were needed to create the data.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Remember that GC is a system-wide activity that affects all threads. Although the GUI may have reached an idle time, can you be sure that other threads aren't doing something important?
Originally posted by William Brogden:
Then the JVM should take care of the problem by not actually starting a gc thread.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
shouldn't it notice when there is idle time and start a gc cycle
BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Consider Paul's rocket mass heater. |