How do you free memory when applet ends?

I have an applet that uses 4 jframes. Any of the frames are set to call both stop() and destroy() whenever user clicks "Exit" or "X" in upper right corner of a frame.
The applet destroy() method does the following:
myAOS32001Frame = null;
myAOS32002Frame = null;
myAOS32003Frame = null;
myAOS32004Frame = null;
myMemoryChangeThread.stop();
try {
URL endedURL = new URL(this.getCodeBase(), "AOS320acEnded.html");
this.getAppletContext().showDocument(endedURL);
} // try
catch (MalformedURLException urlexc) {
urlexc.printStackTrace();
} // catch
This doesn't free up any memory at all. Only when the user closes the browser altogether does the memory free up.
Do I have to set EVERY object (those within frames) to null? How do I set the main applet object (the JApplet class instance) to null (not just its child frames)? Should the garbage collector be run one last time? In what order should all these things occur?
If every object needs to be set to null, anybody have a nice tidbit of code that loops through array of components (and properties) or something and sets them to null?
Thanks.

Thank you both for the tips. They were helpful.
Now my mission is to make the applet as small as possible. It appears the base JVM occupies about 18MB of memory initially, and then my applet uses 12MB more (at times), and the JVM "reserves" about 10MB more.
The only part under my control is the 12MB, it appears, and I'd be interested in general tips to make that as small as possible (maybe by using certain variable types instead of ones currently used, etc.). But I'll ask that in a different thread.

Similar Messages

  • How do you free up memory?

    How do you free up memory on an iPad?  My iPad won't open any application until I free up memory.

    Carolyn, I don't think you are correct. System memory will run out much sooner than storage space. I also seek to free system memory on my iPad since apps run much more reliably when I clear out any other resident programs from the background.
    Of great personal concern is the fact that Apple has apparently barred system information utilities from offering "memory clear" buttons. I really despise having to go into Springboard and manually delete apps one by one. And, if the rumors are correct, then I despise the App Store policies even more.
    Usually, when I have to kill background apps, it's because I need system memory cleared RIGHT NOW. Instead of barring Clear buttons outright, why not issue guidelines on which processes are considered vital, thus leaving them intact in case of Clear?

  • How can we free memory?

    how can we free memory? what do "alter system flush shared_pool" and "alter system flush buffer_cache" commands do?

    If you want to reduce the size of the SGA, you could reduce initialization parameters that are taken into account to size the SGA: see the the Concepts Guide.
    The statements that you have mentionned do no reduce the size of the SGA allocated at OS level but only flush or empty the related caches.

  • How to download free SAP GUI front end for ECC6

    Hi,
    How to download free SAP GUI -Front end for ECC 6
    SD

    Ask your Basis people and they  can give it to u, Its take almost 1 GB  of Space or even u can try in the internert for SAP GUI version for free download. SAP GUI for Windows 7.20 patchlevel  is now available.
    You may download it from the SAP Service Marketplace here.
    Best Regards,

  • How do you free space on the startup disk

    how do you free space on the startup disk

    If your disk is 80% full that is normal.  Time Machine uses up to 80% of the disk space for local snapshots.  To get rid of these snapshots simply plug in your Time Machine backup drive and run a backup. 
    If you have less than 20% disk space then it is time to roll up your sleeves and search for what you can delete and what you can offload to another disk.
    If you have less than 10 GB you definitely need to delete or offload some files.  You may want to maintain at least 20 GB of free space so when your disk starts filling again it will have some room before it hits that 10 GB mark again.  More headroom is better.  If you let the space fall much below 9 GB you might not be able to boot your machine.
    Initial easy steps to gain disk space:
    - Delete all files in the Downloads folder.
    - Empty the trash.
    - Start iPhoto, empty its trash and restart the computer.
    Deleting files:
    Run a Time Machine (or other) backup since you are about to delete and move files and you may need to recover from any inadvertent mistakes or decisions.  You will need one external hard drive for your Time Machine (or other) backup and a second one onto which you will offload some files.
    Then use the free application OmniDiskSweeper http://www.omnigroup.com/more to explore your volume in descending order by size so you can attack the problem from the top down, deleting the largest unwanted files first.  Delete with caution and do not delete any system files.  Remember to empty the trash after trashing the files.
    Moving files:
    Consider moving some of the no-often-used large files or directories to an external disk.  Use ODS again to find them. 
    As noted above this will be at least your second hard drive.  Your first one(s) is/are for your Time Machine (or other) backup(s).  Do not offload files onto a Time Machine disk.
    Format the second drive as Mac OS Extended (journaled).  Using OWS to find large files/folders and copy them from the system drive to the external hard drive and delete them from your internal drive.
    Then  > System Preferences > Time Machine > Options… > Remove the offload HD name from the exclusions list.
    Now both your system disk and your external offload disk will be backed up onto your Time Machine disk.
    For more about backups:
    Time Machine Basics: http://support.apple.com/kb/ht1427
    Most commonly used backup methods:
    https://discussions.apple.com/docs/DOC-3045
    Methodology to protect your data.  Backups vs. Archives.  Long-term data protection:
    https://discussions.apple.com/docs/DOC-6031
    From: http://www.thexlab.com/faqs/freeingspace.html
    To move your iTunes Music folder to another disk or partition:
    To change the location of your iTunes Music folder, carefully follow the instructions in the AppleCare® Knowledge Base document "iTunes for Mac: Moving your iTunes Music folder."Additional information can be found in iTunes Help.
    http://webcache.googleusercontent.com/search?q=cache:http://www.thexlab.com/105/ 00000849.html
    Laptop users may want to consider having two iTunes libraries: a small library of current favorites on their computer, while their complete library resides on an external hard drive. Utilities like iTunes Library Manager enable you to easily have multiple iTunes libraries you can use with your account.  https://www.macupdate.com/app/mac/7689/itunes-library-manager
    To move your iPhoto Library folder to another disk or partition:
    To move the iPhoto Library folder to a new location, employ the instructions in the AppleCare Knowledge Base document from http://support.apple.com/kb/PH2506 corresponding to the version of iPhoto you are using. Additional information can be found in iPhoto Help.
    Laptop users may want to consider having two iPhoto libraries: a small library of current, favorite photographs on their computer, while their complete library, or archives of older photos are saved on an external hard drive. Utilities such as iPhoto Buddy and iPhoto Library Managerenable you to have multiple iPhoto libraries that you can use with your account.
    https://www.macupdate.com/app/mac/12175/iphoto-buddy
    https://www.macupdate.com/app/mac/7158/iphoto-library-manager

  • How do you create bookmarks when you create a PDF from word?

    Hi All, how do you create bookmarks when you create a PDF from word, rather than having to individually copy from a pdf and create bookmarks?
    Adobe 8.1 full version.

    Thanks for the reply, I'll give it a go and will let you know

  • My messages won't say the contact name only shows the phone number, how do you change this when the contact is in my phone under that number already?

    My messages won't say the contact name only shows the phone number, how do you change this when the contact is in my phone under that number already?

    I thought that at first, but I have text this person before and had received responses in a timely manner. Its just weird that it all of a sudden removed their name.
    Would this affect the delivery of the text message?

  • Ques;How  do you secure imail when used being used in iweb. People can mess

    How do you secure imail when used being used in iweb? People can mess w/my settings in iweb imail window.

    What is iMail?
    And what is an iWeb iMail window?
    iWeb is part of iLife 06 which is an application used to create websites hosted on .Mac.
    Are you referring to Apple's Mail application and webmail access using a browser such as Safari to access your .Mac account?
    Which people can mess with what settings? You shouldn't allow anyone else to access your Mac when logged in to your account and home folder/directory. OS X was designed for multiple users of the same Mac with each regular user having their own computer login account (with or without admin privileges) and associated home folder/directory to store and access their data and settings for their login account only.

  • HT201364 How do you free up startup disk space on mac book pro 2013 model its not letting me update anything at all

    how do you free up disk space on macbook pro 2013 model to upgrade and update software

    Freeing Up Space on The Hard Drive
      1. See Lion/Mountain Lion/Mavericks' Storage Display.
      2. You can remove data from your Home folder except for the /Home/Library/ folder.
      3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
      4. Also see Freeing space on your Mac OS X startup disk.
      5. See Where did my Disk Space go?.
      6. See The Storage Display.
    You must Empty the Trash in order to recover the space they occupied on the hard drive.
    You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
    Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located.

  • How do you quit mail when the  'quit mail' is not illuminated

    how do you quit mail when the 'quit mail' is not illuminated

    Command ⌘ + Q, or if that doesn't work, force quit by pressing Command ⌘ + option + esc, selecting Mail, and then Force Quit.

  • How do you access 'finder' when building Smart Previews in Lr5.

    How do you access 'finder' when building Smart Previews in Lr5

    C,
    What type of backup was it? I'm hoping you were using Time Machine or creating a Bootable Clone using Super Duper or Carbon Copy Cloner. If that is the case then I'd recommend starting over so you can restore all your data, applications, settings etc... You missed your first chance when you turned on the new system and it asked if you had another Mac you wanted to migrate from. You can get a  second chance to do this and migrate. Please carefully look over Pondini's Lion Setup Assistant tips beginning where he talks about Second Chance....and make sure you have the proper cable before starting. If your backup EHD has a USB connection that will be fine if it has a FireWIre 400 connection you will a cable like this one from Amazon.
    You can find these at your local computer store, Walmart, Radio Shack etc..

  • How do you video chat when you can't attach an iSight?

    Just curious. I was thinking of getting one a bit later and I do video chat a lot. How do you video chat when they don't produce the iSight anymore? Last I checked the displays don't have a built in iSight.

    I use an iSight hanging upside down from one of the metal brackets that hold my shelf in place. I then use a program called iGlasses to rotate the image so the output is the correct side up. But if you can't get a hold of an iSight, there are plenty of other USB webcams out there that are compatible with Mac, and may or may not have solutions to attaching to monitors. I may have to buy one as my iSight no longer picks up sounds (dead microphone).
    Message was edited by: marokero

  • How do you find out when your gamer club expires?

    how do you find out when your gamer club expires??
    Solved!
    Go to Solution.

    Hey trixr4trey,
    Thanks for being a Gamers Club Unlocked member.  I'm happy to answer your question today.
    To find your Gamers Club Unlocked expiration date log into your account on BestBuy.com.  Then click on "Overview" under the Rewards tab.  Gamers Club Unlocked information will be on the right.
    I will also send you a private message with your current expiration date so that you have the information as quickly as possible.
    Best regards,
    Mike|Social Media Specialist | Best Buy® Corporate
     Private Message

  • How do you reset birthday when you first set up ipod when it first comes on

    How do you reset birthday when you first set up ipod

    This is asked and answered many times every day.
    The forum search bar is on the right side of this page as is the "More Like This" section.  You will find your answer there.

  • How do you close iCloud when frozen

    How do you close icloud when frozen

    klwahl wrote:
    It was the mail application.  I have unchecked it from icloud and all is well.
    Are you sure that "all is well" because you have unchecked iCloud and not simply because you have restarted the application.

Maybe you are looking for