Best Way to "Unload" or remove assets in AS3

I read G. Skinner's article on removing resources in AS3 and
garbage collection (
click
for relevant section of article) and I was a bit astounded.
I understand that one must be careful to manage memory --
remove listeners, add weak references, etc -- and clean up when you
go. I.e. I have a basic understanding of how to make assets, once
off the display list, eligible for garbage collection. But let's
say you load a SWF and it's running -- and particularly if this is
not your own SWF, e.g. in a gallery setting -- is there a way to
get rid of it? What if you load in a SWF, and it uses a lot
of CPU -- and you want it
gone when it's gone? Is there any way to really get rid of
things in AS3, or do you just make them eligible for GC and hope
for the best? This seems a very bad thing -- particularly, if, say,
you're loading in content over which you don't have control (as in
that proverbial gallery).

no.
no.
yes.
and yes.
so, just say no to loading assets over which you have no
control.

Similar Messages

  • Best way to recreate all live assets in SAP and scrap current assets

    We have a situation where we have to recreate all  (15000) our assets as new assets. We will have to create new assets, provide new acquisition value and new useful life and start depreciating them from scratch. Also we will have to dispose all the current assets.
    What is the best way to accomplish this:-
    1)     I was thinking to write a BDC program for AS01 transaction to create new assets and in the text field, give a reference to old assets. 
    For Balances transfer, use transaction FB01 or F-91.
    *2)     Use BDC to map transaction AS91 and add in value there.  Although this is not transferring from legacy data but only in SAP. Will these current assets be considered as legacy data.   Is this transaction feasible to use.* 
    Also, what transaction can I use for mass asset data scrapping of current assets
    Thanks,
    Tanya
    Edited by: Tanya321 on Jul 6, 2009 7:33 PM

    Tanya,
    You can do a mass retirement of assets. Please check out this link.
    http://help.sap.com/saphelp_erp2004/helpdata/en/4f/71ece8448011d189f00000e81ddfac/content.htm
    For mass creation of assets you can use the LSMW tool.
    Regards,

  • Best way to backup and remove an iMovie Project?

    Hi all,
    i am curious of the best way to backup (to external drive) and then remove an iMovie Project from the Mac laptop?

    still curious about this...

  • Best way to add and remove JPanels?

    I have a question on the best practice in removing and then adding JPanels. I know a few ways about doing it but it never seems to work just how I want it to. Any help would be great. Also if anyone wants to give tips on better ways of writing this code I am out your any ideas.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    class test2 extends JFrame implements ActionListener {
        private static final int FRAME_WIDTH    = 575;
        private static final int FRAME_HEIGHT   = 500;
        private static final int FRAME_X_ORIGIN = 150;
        private static final int FRAME_Y_ORIGIN = 250;
        //jbutton
        String [] foodButton = {"Tofu Burger",   "Cajun Chicken",
                                "Buffalo Wings", "Rainbow Fillet",
                                "Rice Cracker",  "No Salt Fries",
                                "Zucchini",      "Brown Rice",
                                "Cafe Mocha",    "Cafe Latte",
                                "Espresso",      "Oolong Tea"};
        JButton b[]          = new JButton[foodButton.length];
        JButton orderButton  = new JButton("Order");
        JButton cancelButton = new JButton("Cancel");
        JButton backButton   = new JButton("Back");
        int [] foodCount     = new int [12];
        double [] foodCost   = {3.49, 4.59,
                                3.99, 2.99,
                                0.79, 0.69,
                                1.09, 0.59,
                                1.99, 1.99,
                                2.49, 0.99};
        double subtotal;
        JPanel outPut         = new JPanel();
        JLabel test           = new JLabel ("Subtotal: ");
        //constructor
        public test2() {
            setContentPane(outPut);
            foodButton();
            frame();
            setVisible(true);
        //frame
        public void frame() {
            setSize(FRAME_WIDTH, FRAME_HEIGHT);
            setResizable(true);
            setTitle("Welcome to Low Fat Burger");
            setLocation(FRAME_X_ORIGIN, FRAME_Y_ORIGIN);
        //button builder
        public void foodButton() {
            ImageIcon myIcon = new ImageIcon("C:/Documents and Settings/Keith/My Documents/My Pictures/Clip Art/lowFatBurger.jpg");
            JPanel header    = new JPanel();
            JPanel menu      = new JPanel();
            JPanel bottom    = new JPanel();
            JPanel subtotal  = new JPanel();
            JPanel itemCount = new JPanel();
            JPanel control   = new JPanel();
            outPut.setLayout(new BorderLayout(0, 0));
            //outPut.setBorder(BorderFactory.createLineBorder(Color.red));
            outPut.add(header,   BorderLayout.NORTH);
            outPut.add(menu,     BorderLayout.CENTER);
            outPut.add(bottom,   BorderLayout.SOUTH);
            header.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
            header.add(new JLabel(myIcon));
            menu.setLayout(new GridLayout(4, 3));
            //test.setLayout(new FlowLayout());
            //test.setBorder(BorderFactory.createLineBorder(Color.red));
            for(int i=0; i<foodButton.length; i++) {
                b[i] = new JButton (foodButton);
    //work area
    b[i].addActionListener(this);
    menu.add(b[i]);
    //add actionlistener to control buttons
    orderButton.addActionListener(this);
    cancelButton.addActionListener(this);
    backButton.addActionListener(this);
    bottom.setLayout(new BorderLayout(0, 0));
    bottom.add(subtotal, BorderLayout.NORTH);
    bottom.add(itemCount, BorderLayout.CENTER);
    bottom.add(control, BorderLayout.SOUTH);
    subtotal.add(test);
    control.add(orderButton);
    control.add(cancelButton);
    public void actionPerformed(ActionEvent event) {
    String straction = event.getActionCommand();
    //format
    DecimalFormat df = new DecimalFormat("0.00");
    for(int j=0; j<foodButton.length; j++) {;
    if(event.getSource() == b[j]) {
    int count = ++foodCount[j];
    double itemSubtotal = count * foodCost[j];
    for(int i=0; i<foodButton.length; i++) {
    subtotal = (foodCount[i] * foodCost[i]);
    test.setText("Subtotal: $" + df.format(subtotal));
    if(straction.equals("Cancel")) {
    }else if(straction.equals("Order")) {
    //menu.removeAll();
    //control.removeAll();
    //control.add(orderButton);
    //control.add(backButton);
    //menu.revalidate();
    //menu.repaint();
    }else if(straction.equals("Back")) {
    public static void main (String[] args) {
    new test();

    If you want a really cheap way to go about it, you could try setVisible(false) instead of removing the panel. It will result in the same visual effect, and if you ever need to add the component back, you just need to setVisible(true) again.
    But make sure you do it inside the event loop...
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            panel.setVisible(false);
    });

  • What is the best way to find and remove unneeded language files from Mac OS X 10.8.4?

    I have tried Spring Cleaning and it finds the files and then quits!

    You can do this with a *FREE* utility called Monolingual.  Another app that apparently does all the work for you.  I’ve used it since Tiger w/never any problems.  Just make sure you read all of the instructions.
    However, there is a warning for *native English speakers*. Make sure you keep BOTH English and English (United States).
    Works on OS X 10.8 (Mountain Lion)

  • Best Way to Upgrade or Sell?

    You can see my computer components in my sig, but I'm trying to figure out the best way to unload my MB, RAM, Video card & CPU w/fan and not feel like I'm throwing it away for the sake of upgrading to a newer setup.
    Any insight? I feel like I'd prolly get raked over the coals on Ebay...

     I assume it's a 865G Neo2-LS. No telling what you would get for parts but I would guess not near as much as you would want. I got about $87 for the sale of MB, CPU, VGA & sound cards on eBay from my old K7N2G-ILSR, Athlon XP 2500+ sytem. Enough to pay for my new MB ($75) & HSF (HSF $9 after rebate & sale price) when I built system about 3 months ago.
     I would think you can get a bit more for your stuff though. Only way to find out is start looking on eBay and see what prices are for things you have.

  • Best way to remove last line-feed in text file

    What is the best way to remove last line-feed in text file? (so that the last line of text is the last line, not a line-feed). The best I can come up with is: echo -n "$(cat file.txt)" > newfile.txt
    (as echo -n will remove all trailing newline characters)

    What is the best way to remove last line-feed in text file? (so that the last line of text is the last line, not a line-feed). The best I can come up with is: echo -n "$(cat file.txt)" > newfile.txt
    (as echo -n will remove all trailing newline characters)
    According to my experiments, you have removed all line terminators from the file, and replaced those between lines with a space.
    That is to say, you have turned a multi-line file into one long line with no line terminator.
    If that is what you want, and your files are not very big, then your echo statement might be all you need.
    If you need to deal with larger files, you could try using the 'tr' command, and something like
    tr '
    ' ' ' <file.txt >newfile.txt
    The only problem with this is, it will most likely give you a trailing space, as the last newline is going to be converted to a space. If that is not acceptable, then something else will have to be arranged.
    However, if you really want to maintain a multi-line file, but remove just the very last line terminator, that gets a bit more complicated. This might work for you:
    perl -ne '
    chomp;
    print "
    " if $n++ != 0;
    print;
    ' file.txt >newfile.txt
    You can use cat -e to see which lines have newlines, and you should see that the last line does not have a newline, but all the others still do.
    I guess if you really did mean to remove all newline characters and replace them with a space, except for the last line, then a modification of the above perl script would do that:
    perl -ne '
    chomp;
    print " " if $n++ != 0;
    print;
    ' file.txt >newfile.txt
    Am I even close to understanding what you are asking for?

  • How is the best way to remove something from a photo?

    How is the best way to remove something from a photo?

    This is difficult to answer without fully knowing what you are trying to do.
    That said, a few excellent and user friendly retouching tools include:  The Spot Heealing Brush Tool, Healing Brush Tool, Patch Tool, and the Cloning Stamp Tool.

  • My Macbook pro was stolen 09/12, the police just returned it to me. I want to remove all the data and start over. Format the drive's etc. I have windows 7 on 1 partion and mountain lion OSX on the apple partition. How is the best way to do this?

    My Macbook pro was stolen 09/12, the police just returned it to me. I want to remove all the data and start over. Format the drive's etc. I have windows 7 on 1 partion and mountain lion OSX on the apple partition. How is the best way to do this?

    Have a look here...
    what-to-do-when-your-hard-drive-is-full.html

  • Best way to remove duplicates based on multiple tables

    Hi,
    I have a mechanism which loads flat files into multiple tables (can be up to 6 different tables) using external tables.
    Whenever a new file arrives, I need to insert duplicate rows to a side table, but the duplicate rows are to be searched in all 6 tables according to a given set of columns which exist in all of them.
    In the SQL Server Version of the same mechanism (which i'm migrating to Oracle) it uses an additional "UNIQUE" table with only 2 columns(Checksum1, Checksum2) which hold the checksum values of 2 different sets of columns per inserted record. when a new file arrives it computes these 2 checksums for every record and look it up in the unique table to avoid searching all the different tables.
    We know that working with checksums is not bulletproof but with those sets of fields it seems to work.
    My questions are:
    should I use the same checksums mechanism? if so, should I use the owa_opt_lock.checksum function to calculate the checksums?
    Or should I look for duplicates in all tables one after the other (indexing some of the columns we check for duplicates with)?
    Note:
    These tables are partitioned with day partitions and can be very large.
    Any advice would be welcome.
    Thanks.

    >
    I need to keep duplicate rows in a side table and not load them into table1...table6
    >
    Does that mean that you don't want ANY row if it has a duplicate on your 6 columns?
    Let's say I have six records that have identical values for your 6 columns. One record meets the condition for table1, one for table2 and so on.
    Do you want to keep one of these records and put the other 5 in the side table? If so, which one should be kept?
    Or do you want all 6 records put in the side table?
    You could delete the duplicates from the temp table as the first step. Or better
    1. add a new column WHICH_TABLE NUMBER to the temp table
    2. update the new column to -1 for records that are dups.
    3. update the new column (might be done with one query) to set the table number based on the conditions for each table
    4. INSERT INTO TABLE1 SELECT * FROM TEMP_TABLE WHERE WHICH_TABLE = 1
    INSERT INTO TABLE6 SELECT * FROM TEMP_TABLE WHERE WHICH_TABLE = 6
    When you are done the WHICH_TABLE will be flagged with
    1. NULL if a record was not a DUP but was not inserted into any of your tables - possible error record to examine
    2. -1 if a record was a DUP
    3. 1 - if the record went to table 1 (2 for table 2 and so on)
    This 'flag and then select' approach is more performant than deleting records after each select. Especially if the flagging can be done in one pass (full table scan).
    See this other thread (or many, many others on the net) from today for how to find and remove duplicates
    Best way of removing duplicates

  • I got some hair spray on my new retina display screen. What is the best way to remove.

    I got some hair spray on my new Mac Book Pro Retina Display. Any thoughts on the best way to remove?

    I would use this.  I use it on my MBPs and it does an excellent job.  I cannot say with authority that it will remove your hair spay residue.
    Ciao.
    http://www.soap.com/p/windex-for-electronics-aerosol-97299?site=CA&utm_source=Go ogle&utm_medium=cpc_S&utm_term=ASJ-294&utm_campaign=GoogleAW&CAWELAID=1323111033 &utm_content=pla&adtype=pla&cagpspn=pla&noappbanner=true
    I clicked the reply button too early.
    Message was edited by: OGELTHORPE

  • Best way to edit an asset style??

    i wanted to change the color of an asset style. what's the
    best way to approach this? for example, there are all kinds of
    grayscaled glassy styles in the assets panel. if i take a plain
    rectangle and want to apply the glassy asset style, but in a
    different color, what's the easiest way to change the coloring?
    thanks

    Make your changes to the Style (Edit current ones/ or Add New
    ones via the PI Filters).
    When complete with changes, go back down to the PI, click the
    +, the n 'Options' from the list, then Save As Style.
    Give your Style a new name, then OK.
    h

  • Best way to remove dust from a MacPro

    what is the best way to clean the inside of a Macpro. When I go inside to remove or update components there is considerable dust. In the past I have grounded my self and gently wipe some of the areas with a light cloth to remove dust. There are areas on the mother board I would like to clean off also would canned air be ok.
    Thank you
    Dick

    Computer and electronics safe to use:
    Metro Vacuum ED500 DataVac 500-Watt 0.75-HP Electric Duster 120-Volt
    www.amazon.com/Metro-Vacuum-ED500-500-Watt-Electric/dp/B001J4ZOAW/
    My guess though is any thing that was loose or can be loosened (cable connection somewhere?) can be, would be the only thing to watch out for. Less on Mac Pro than on my PCs with fans and clips for power or an SATA cable that could slide off.
    I don't know what mac model you have but DIMMs do have a tendency like any electronic part to attract and hold onto dust.
    The old G5s were notorious for how much dust could build up down inside those systems and get empacked. And somehow still work but not as well.
    If you see temperature sensors that don't look normal, or the fans seem to be working when you aren't doing anything, that would then be a reason to take action. Otherwise, not sure if more harm than needed good.

  • What's the best way to remove inactive iChat users from jabberd2.db?

    I'm about to run Autobuddy for users on my iChat server. However, there are several users that are no longer around and I don't want their records showing up in everyone's buddy list.
    What's the safest/best way to remove them?
    My plan is to use sqlite3 on the command line and use SQL to remove the entries from the "active" table, but I don't know what impact that may have on the rest of the database.
    Any thoughts or suggestions?

    Never mind...
    Thought I had looked through enough threads.  Found the following just after posting my question:
    /usr/bin/jabber_autobuddy -d [email protected]
    Works like a charm.

  • Best way to remove Stateful session beans

    Hi folks.
    I'm running Weblogic 6.1. I'm trying to find the best way of removing
    stateful session beans. I know to call EJBObject.remove() on the
    client side, but this will not always happen if the client crashes or
    times out. This is a java client application connection to weblogic,
    no servlets are involved.
    Is there a way to signal the appserver to remove all stateful session
    beans associated with a user when the User logs out? I would rather
    not remove them using a time out mechanism.
    thanks.
    rob.

    But in the documentation and also based on my experience I noticed that the
    timeout does not take effect till the max-beans-in-cache limit is reached.
    How do you handle that?
    "Thomas Christen" <[email protected]> wrote in message
    news:3e35795d$[email protected]..
    Hi,
    Is there a way to signal the appserver to remove all stateful session
    beans associated with a user when the User logs out? I would rather
    not remove them using a time out mechanism.Had the same problem and solved it the following way :
    - The client has thread polling its sessionbean at the server (every 30
    Sec.)
    - The session bean has a short timeout (2 Minutes)
    If the client fails, the timeout will catch it otherwise the client will
    gracefully call remove bevor exit.
    Regards
    Tomy

Maybe you are looking for

  • Date Format problem...

    Hi users, Forte version : 2.e.2 and ForteWebSDK Datacase : Oracle We have a problem with a simple HTML text field which acccepts a date. When we try to update the record with some date, the following exception occurs: 24-Jun-1998 04:32:28 : XV01086 :

  • Need the following reports...urgent!!!

    Hi Gurus..... •A detailed report for listing goods receipts by material wise for a given period which contains detailed information like PO No, PO Date, Plant, GR ref, GR date, Material description. [Tables involved: EKKO, EKPO, MSEG, MARA, MKPF, MKE

  • Error in upgrade in TOOLIMPD3 phase

    hi all, we are getting eror in TOOLIMPD3 phase while doing upgrade. as per the log.... ERROR: 1 activities have been aborted in TOOLIMPD3. ERROR: Operation(s) not completely processed.        Remaining change requests found in buffer PRD.        Igno

  • How to assign fields to access sequence

    Hi expert i have assigned condition table to  access sequence but it contains nothinng.its not showing the fields available in the table can someone help me how to add these fields in acess sequence i was able to add condiion table in access sequence

  • A2109 touch screen is not responding.

    I did a system update.  After the reboot, the touch screen doesn't work. I did a factory reset using the recovery menu.  It went to the setup screen with language and time zone setting, but i can't choose anything.  Touch screen went dead.  Any input