Sitemap

Amicuk Programming Answers

Do you think JOptionPane dialogs force garbage collection afterwards?

2015-10-11   Views:0

Advertisement

I ask because I've made a nested static class to implement my own file selection tool; the problem is that each time I call it the old JPanel is being recalled and so the components get re-added to it each time it's called, resulting in n versions of

I ask because I've made a nested static class to implement my own file selection tool; the problem is that each time I call it the old JPanel is being recalled and so the components get re-added to it each time it's called, resulting in n versions of each file for every n times you open it.
I'm running myDialog.dispose() upon exiting, so is my only option now manual garbage collection? How could I force it to be garbage collected? Because System.gc() seems to have no effect.

The replay answer
Advertisement
Strictly speaking there is no way to force garbage collection, so, no, JOptionPane will not be doing it.
You almost certainly have a leak in your code. Post it and we may be able to help.

Go to See the other 3 answers

Do you think JOptionPane dialogs force garbage collection afterwards?

Category:DefaultRelease time:2015-10-11Views:130

I ask because I've made a nested static class to implement my own file selection tool; the problem is that each time I call it the old JPanel is being recalled and so the components get re-added to it each time it's called, resulting in n versions of[More]

Memory leak in java / forcing garbage collection for unused resource?

Category:DefaultRelease time:-0001-11-30Views:130

Is there any possibility in big programs if not designed properly for leakage of memory? If say i forget to force garbage collection of unused resouces what will happen? Even if i am forcing garbage collection how much assurity can be given to do so?[More]

Force Garbage Collection through scripting

Category:DefaultRelease time:-0001-11-30Views:130

Hi , I am using weblogic server 8.1.5 on windows 2003 server. can we do force garbage collection through a script? If so can i have a sample script for the same? OS:windows 2003 server thanks in advance. Madan MohanAnd the key here is "any length of[More]

Why can we force Garbage Collection

Category:DefaultRelease time:-0001-11-30Views:130

Hello, Why can we force garbage collection since we have AUTOMATIC garbage collection?If you don't call dispose on the Window, it may keep a GUI thread running in the background. Since this thread is still running and accesible from the root, it will[More]

Force Garbage Collection

Category:DefaultRelease time:-0001-11-30Views:130

Before I load a new level, should I force garbage collection on the old level? And if so, how?Just remember that the method suggest the garbage collector to run, not forcing it.. If you have a lot of objects created that are later available for garba[More]

Force Garbage collection externally....

Category:DefaultRelease time:-0001-11-30Views:130

hi! I am new to java.is it possible to the force Garbage collection externally? can i achieve it by giving the command "System.gc();".pls give me idea... Thanx Rgds,You can't force a full GC as far as I know. gc() might force a GC of the younges[More]

Applescript: force garbage collection?

Category:DefaultRelease time:-0001-11-30Views:130

Hello I am trying to call applescript functions (from my cocoa application - using NSAppleScript's -executeAndReturnError), to automate some operations in Microsoft Word. The problem is that after every Applescript call, the Word operates slower and[More]

Howto Force Garbage Collection manually in Oracle Application Server

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I have a Oracle SOA suite installed on Oracle 10g Application Server. The heap memory for the SOA oc4j container is 2G with a permgen space of 256M. But it looks like there is some memory leak somewhere and the Heap area is getting filled frequen[More]

Will system.gc() force garbage collection?

Category:DefaultRelease time:-0001-11-30Views:130

what impact will the method system.gc() have if i call it in one of the user methods.If you use Sun's HotSpot 1.5.0 JVM (or later) with the -XX:+UseConcurrentMarkSweepGC (low-latency) garbage collector, you can use the additional flag -XX:+ExplicitGC[More]

Can I force full garbage collection?

Category:DefaultRelease time:-0001-11-30Views:130

Hi, my program is memory bound , as users load more files more memory is required , if the user decides to load a very large number of files they will eventually run out of memory. So I am trying to detect when there is less 15% of heap memory left,[More]

Cache voluntary garbage collection called

Category:DefaultRelease time:-0001-11-30Views:130

We have installed Oracle Web Cache 2.0.0.4.0 on Windows 2000. We setup the Maximum cache size parameter to 1000Mb, but, when we try to caching a web using WGET, Oracle Web Cache return a "cache voluntary garbage collection called" in the file of[More]

Hot
I have an iMac with multiple user accounts each with an Apple ID and individual iTunes library and Itunes match linking to iPhones iPads etc. I bought songs on my iPhone yesterday, on trying to listen to them on the iMac (my user account) this mornin [More]
Can someone tell me how i sync my ipod on my new computer. i have authorised the computer but i can not find where to sync it. i thought Apple was meant to be easyHi Richail, Once you have selected your sync options in iTunes, such as what music or v [More]
Hi, silly issue. In my workplace my Macbook Pro connects via Ethernet to the Network for surfing. I also have a Timecapsule in my office which i wanto back up to wirelessly. Problem; The Airport always tries to connect to a different Wireless network [More]
<blockquote>Locking duplicate thread.<br> Please continue here: [/questions/837290]</blockquote> Hi folks, I have a strange one - I can type in a password into a password field in FF3.6.17, but the field stays blank (or sometimes a space [More]
Keep getting this message.  Any suggestions?This worked for me -- Right click on the itunes.exe file in C:/program files/iTunes/, Go to properties and then to the security tab. From the security tab select 'Users' under the users and groups section a [More]
Hello, I am trying to implement the package example from the SUN Tutorial. It can be found on the page: http://java.sun.com/docs/books/tutorial/java/interpack/QandE/packages-questions.html I think I am doing like described but it doesn�t work. The fi [More]
Facebook photos on my Mac look fine but are too dark on my iPad.  Can I change any settings on my iPad?This can be caused by a problem with the color profile for your display monitor or color profiles embedded in images.<br /> You can disable color [More]
I went to the Cerritos store tonight looking for a "RCA to USB connector" and was told by the sales person in Home Theater that "no such product exists". When I got home, I went to Amazon.com and bought one for $3.50 plus $.50 shipping [More]
Post Author: rOmain CA Forum: Administration Hi,   what is the easy way to know, at any time, if an object on a specific universe is used in BO documents (Desk I). BO support advises me to use Uuditor, but I want to know if users have another solutio [More]
Hi In asset master layout setting, we tell system which all fields needs to be made mandatory at the time of creating asset master. This setting we do at screen layout and this screen layout is assigned to asset class. I want to know table where i ca [More]