Releasing Objects from memory-Performance improvement

First Javafx was excellent in coding on UI rapidly. We did a image application and it was fine with some small memory tweaking pending. Since we have binded variables from static file to all objects, i think the memory of objects removed or deleted is not getting released. Is the there any way to unbind or destroy the objects which are binded. I think the the next release of Javafx will have a better performance.Any ideas or suggestions will help us to improve the performance drastically. Any help on this regard is highly appreciated. Thanks in advance.

Thanks Keap for your reply. Since we have used bind extensively, let me tell scenario the where we have used binding. We used a static class in javafx. Many variable in static class has been binded to javafx objects. Since the variable of javafx objects are binded to stastic varaibles, i doubt even after after not using the objects they are in the memory, because of the binding reference. since i dont have control of the static file scope, the objects are in memory and the app throws out of memory after sometime.We came forward with solution ie to use the conditional binding. I need other experts comments before proceeding as it needs lot of refactoring. I like to know whether the following statement
"var a = bind if (condtion) c else d" (note: c is a variable in static class eg MainStatic.c)
will deattach the binding of "a"with the the static file variable.
As this issue blocking, we need a solution to improve it. Any help on this would be highly usefull.
Thanks in advance

Similar Messages

  • Simple Java question about releasing beans from memory

    Hi,
    I use many beans in my app. Is there a way to release them from memory, or destroy the object. I feel that its possibly eating my memory up over time. Most of my beans are in page scope. Some are in session scope. So the page scope ones should kill them at the end of execution of the page and the session ones should delete the object from memory when at the last page of the app where session is no longer needed.
    Someone mentioed System.exit(1); but I have not found any clear documentation that this will free up the memory that it has used.
    Thanks for your time. It is appreciated.

    There is no way to explicitly force the memory to be released. The JVM garbage collection will take care of it when more memory is required. The programmer's responsibility is to ensure that there are no remaining references to the object. System.exit() ends the JVM so you do not want to use that. You can call System.gc() to request that garbage collection runs, but the JVM does not guarantee that it will.

  • How to remove the Object from memory.

    Hello.
    Flash file that i made with Flex Builder uses memory too
    much.
    Look at the next example source code.
    var testCan:Canvas = new Canvas();
    this.addChild(testCan);
    this.removeChild(testCan);
    testCan = null;
    but just memory usage still goes up, is not freed instantly.
    so if i load the large flash files on my web browser,
    after 5 munites or something, the web browser is down.
    How to remove the object from memory immediately without
    delay?

    It's all about the Garbage Collector ..
    There is a nice write up here :
    http://www.gskinner.com/blog/archives/2006/06/as3_resource_ma.html

  • Remove my objects from Memory

    I have a class "Ball" which display graphical circle ball in random x&y axis and I  fade out it with Event.ENTER_FRAME and specify removeEventListener if it reach alpha<=0 .
    Now I made multiple object from "Ball" class. Now, In my stage it works nice but when I see my Computer Memory status. my current flash.exe is increasing memory rapidly. Is how to remove my unusual object from my Memory. So that it would not get hang. At last thanks for taking interest on my problem

    Here is a usefull article about garbage collection in flash. I came across it few weeks back ,I would like to share it :
    http://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html

  • How to garbage collect an newed as3 Sound Object from memory?

    For example, using next text code:
    package
              import flash.display.*;
              import flash.events.*;
              import flash.media.*;
              import flash.system.*;
              import flash.system.*;
              public class Main extends Sprite
                        [Embed(source = "../data/SongScene8.mp3")] protected var SongScene8:Class;
                        public function Main():void
                                  if (stage) init();
                                  else addEventListener(Event.ADDED_TO_STAGE, init);
                        private function init(e:Event = null):void
                                  removeEventListener(Event.ADDED_TO_STAGE, init);
                                  System.gc();
                                  trace("Before");
                                  trace(System.totalMemory);
                                  trace("_________________")
                                  var sound:Sound = new SongScene8();
                                  System.gc();
                                  trace("After new");
                                  trace(System.totalMemory);
                                  trace("_________________")
                                  sound = null;
                                  System.gc();
                                  trace("After null");
                                  trace(System.totalMemory);
    The output is:
    Before
    3461120
    After new
    3604480
    After null
    3604480
    * Even if the gc runs a thousand times after, the last, increased value remains.
    * I've tested this too by importing an mp3 from an .swc, rather than from a file. The result is similar.
    * Tracing System.privateMemory rather than System.totalMemory gives similar (although offset) results.
    Wether or not a soundchannel is played on it, it looks like the Sound Object
    cannot be removed from memory.
    Please say I'm wrong and tell me why.
    Thanks in advance

    works for me in cs5.5:
    Loop 1
    Before
    28780
    sound created
    28796
    After null 0
    29380
    After null 1
    29196
    After null 2
    29192
    After null 3
    29192
    Loop 2
    Before
    29192
    sound created
    29208
    After null 0
    29196
    After null 1
    29196
    After null 2
    29196
    After null 3
    29196
    Loop 3
    Before
    29196
    sound created
    29208
    After null 0
    29196
    After null 1
    29196
    After null 2
    29196
    After null 3
    29192
    Loop 4
    Before
    29192
    sound created
    29204
    After null 0
    29192
    After null 1
    29192
    After null 2
    29192
    After null 3
    29192
    Loop 5
    Before
    29192
    sound created
    29204
    After null 0
    29192
    After null 1
    29192
    After null 2
    29192
    After null 3
    29192
    Loop 6
    Before
    29192
    sound created
    29204
    After null 0
    29192
    After null 1
    29192
    After null 2
    29192
    After null 3
    29192
    Loop 7
    Before
    29196
    sound created
    29208
    After null 0
    29196
    After null 1
    29196
    After null 2
    29196
    After null 3
    29196
    use a frame loop to repeatedly execute the following and verify no memory leak:
    var loops:int;
    loops++;
    if(loops>6){
        stop();
    } else if(loops==1) {
        var s:String = "";
    s+="Loop "+loops+"\n";
    s+="Before\n";
    s+=System.totalMemory/1024+"\n";
    var sound:Sound = new SongScene8();
    s+="sound created\n";
    s+=System.totalMemory/1024+"\n";
    var n:int;
    clearF();
    function clearF():void {
        n=0;
        sound=null;
        this.addEventListener(Event.ENTER_FRAME,f);
    function f(e:Event):void {
        System.gc();
        s+="After null "+n+"\n";
        s+=System.totalMemory/1024+"\n";
        n++;
        if (n>3) {
            this.removeEventListener(Event.ENTER_FRAME,f);
            s+="_________________\n";
            if(loops>6){
                trace(s);

  • Release object from transport request

    HI
    I want to take off two objects from my transport request.
    How is it possible without releasing all the exisiting objects from the request.
    Regards,
    Tapish

    Hi Tapish,
    You can go in any of the following ways
    1)Goto SE01 and give your transport request number.
       goto your task and click on edit button. you will get the list of all objects in a table.
       click on the object that needs to be deleted and click on the delete button.
    2)Goto se03 and give your request number to unlock all the objects.
        click on the objects that need to be deleted and click on delete button on top.
        dont forget to lock the objects after deleting the required
    The second option will  work in your case i guess.
    Hope this helps..
    Cheers,
    Srinath.

  • How to remove/destroy previous object from memory

    hi guys, I am getting problem of memory of having repeating object.
    Below is my code.
    import flash.system.System;
    var counter:Number=0;
    var systemMemory:TextField=new TextField();
    systemMemory.x=200;
    stage.addEventListener(Event.ENTER_FRAME,showNext);
    function showNext(event:Event){
        var myTxt:TextField=new TextField();
        myTxt.text=counter.toString();
        myTxt.width=100;
        myTxt.height=20;
        myTxt.x=Math.random()*100;
        systemMemory.text="Total Memory Used :"+System.totalMemory.toString();
        systemMemory.width=300;
        addChild(systemMemory);
        addChild(myTxt);
        counter++;
    Above code does repeat textField Object continuously. Now I want to destroy previous created textField Object. So that my memory will not be hang. I got some where in the blog that with System.gc()  could clear garbage collection. But currently I am not working with system.gc any more I want to clear previous object in programatically way. Is there any way that I could destroy previous created object ?

    ok, thanks for your kind replay. Above is my test case. Actually, I need to do show 4 texfield in each FRAME_ENTER with different text properties's value + previous textFields should be remove and comes next 4 textField.
    import flash.text.TextField;
    import flash.display.Sprite;
    import flash.display.Stage;
    import flash.events.Event;
    import flash.system.System;
    var frameNo:Number=0;
    var txtFieldGroup:Array=new Array();
    var mem:TextField=new TextField();
    stage.addEventListener(Event.ENTER_FRAME,showTxtFields);
    function showTxtFields(event:Event):void{
        var eachGap:Number=100*frameNo;
        /* Removing data from txtFieldGroup if there any data */
        if(txtFieldGroup.length>0){
            txtFieldGroup.length=0;
        /* created textField objects and set it in an array */
        for(var i:Number=0; i<4; i++){   
            /*txtFieldGroup[frameNo][i]=frameNo.toString()+":"+i.toString();*/
            txtFieldGroup[i]=new TextField();
            txtFieldGroup[i].text=frameNo.toString()+i.toString();
            txtFieldGroup[i].y=(20*i)+eachGap;
            addChild(txtFieldGroup[i]);
        // System Memory Message
        mem.text="System Memory: "+System.totalMemory;
        mem.x=250;
        mem.width=300;
        addChild(mem);
        // Frame No increment
        frameNo++;
    here, from above script it created 4 txtObject in each frame no. I have clear array in each frame no. But I could not remove textFieldObject from CPU Memory. As you can see textField object of mem. As you say in earlier post making 4 different textfield at initialy  is nice option to control over CPU Memory. Is there any technique so that I could remove previous created textField object because . I am also having problem why my textfields are shows more than 4. I was expecting only 4 textField in each frame. Please you suggestion is required. Thanks for studying my confusion.

  • Identify the transport request for released Objects from BW(any BW Object)

    Hi
    How do i identify the transport request in which i have collected the BW Object(Say Transfer rule) which got released to the testing system.
    Please guide me.
    Thanks,
    Satya

    Hi Satya,
    Just follow these steps,
    1)Go to the Update Rule and Double click on the Rule.
    2)Click on Extras->Object Directory Entery>In hte Heading u can c Object.
    3)This Objectr has Detials>R3TRUPDR-->Tech Name of Update Rule
    4)Come to SE03
    5)Come to Eiight Row-8 and Enter UPDR in the 3 Column adn the Tech Name in the 4 Column,TICK it and Execute
    Now it will display when and all it gpot transported.
    Similarly u can do it for Objects like MPRO for Multiprovider,ODSO for DSO,ETC
    Rgds
    SVU123
    Edited by: svu123 on Dec 10, 2009 12:05 PM

  • [svn] 2692: Bug: BLZ-227 - When using JMS Destination, MessageClient and FlexClient not released from memory when the session times out .

    Revision: 2692
    Author: [email protected]
    Date: 2008-07-31 13:05:35 -0700 (Thu, 31 Jul 2008)
    Log Message:
    Bug: BLZ-227 - When using JMS Destination, MessageClient and FlexClient not released from memory when the session times out.
    QA: Yes
    Doc: No
    Checkintests: Pass
    Details: Fixed a memory leak with JMS adapter. Also a minor tweak to QA build file to not to start the server if the server is already running.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-227
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/adapters/J MSAdapter.java
    blazeds/branches/3.0.x/qa/build.xml

    Revision: 2692
    Author: [email protected]
    Date: 2008-07-31 13:05:35 -0700 (Thu, 31 Jul 2008)
    Log Message:
    Bug: BLZ-227 - When using JMS Destination, MessageClient and FlexClient not released from memory when the session times out.
    QA: Yes
    Doc: No
    Checkintests: Pass
    Details: Fixed a memory leak with JMS adapter. Also a minor tweak to QA build file to not to start the server if the server is already running.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-227
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/adapters/J MSAdapter.java
    blazeds/branches/3.0.x/qa/build.xml

  • Upgraded both computers in the household and found Lion is too disruptive to workflow.  Do I turn in the new laptop for a pre-Lion rebuild to keep Snow Leopard, or do I return computer and get upgraded memory to improve performance of existing MacBookPro?

    Upgraded both computers in the household and found Lion is too disruptive to workflow. 
    Do I turn in the new laptop for a pre-Lion rebuild to keep Snow Leopard, or do I return new computer and get upgraded memory to improve performance of existing MacBookPro?  I'm mostly still happy with existing MacBookPro, but Aperture doesn't work, the computer can't handle it.
    Other possibility is setting up virtual machine with Snow Leopard server software on new computer.
    Any opinions on what would allow moving forward with the least hassle and best workflow continuity?

    hi,
    what year and specs does the MBP have

  • How to unlock objects from a Released Task?

    Hi Group,
    I have a TR in which, there was a task added for my developments.
    Thing is, in the same TR one person has created a program and smartform objects and released the task.
    Now, I have to move these 2 objects into another TR.... I tried with various options like, tried to release the lock of the objects going thru the released task, Changing the package to Temp, Deleting the object from the released task and etc., but nothing is happening and a message is coming up(while Unlocking the objects - Request/Task XXXXXXXX already released(not modifiable).
    In summary, I want to release the locks(on the objects - under a Task that got released) and move these Unlocked objects into a separate new TR.
    Kindly let me know your inputs.
    Regards,
    Vishnu.

    Hello
    Though it may not be the right way, i generally follow this approach for similar case. I would change the status of the task (TRSTATUS) in debugging mode in table E070 from 'N' to 'D' and make the changes. It has so worked so far for me without any issues.
    Now the request will be modifiable and you can delete the objects from this request and move to a new one.
    But make sure you also delete the objects which will be transferred to the request from the task after you release the task in SE09/10.
    Regards
    Ranganath

  • Performance improvement from OAS 4.0.7 to 9iAS

    Any performance improvement from OAS4.0.7 to 9iAS. What are the parameters to be changed to upgrade from 4.0.7 to 9iAS.
    Regards,

    Customers generally see performance improvements when upgrading to 9iAS. How the upgrade process works is explained in the documentation at http://otn.oracle.com/docs/products/ias/index.html
    null

  • Performance Improvements (Follow-Up from P2P)

    Business One response time has great impact on customer satisfaction. We want to further invest in this area and therefore asking for your feedback.
    We would like to further improve performance in areas that are important for a typical customer profile. With this goal in mind we look for you advice on specific performance bottle neck that you recommend us to focus on.
    This thread is continuation from 'Performance Improvements' <a href="http://p2p.sap.com/businessoneforum?type=join&login=1&uid=41FB661A76CED536C825C4E2B6FF4397&cid=91&go=z37225">discussion</a> in P2P SAP Business One Forum (Product Development Collaboration). Previous discussion on P2P is summarized in the attached file.

    Peter,
             We are also having intermittent performance issues with SBO. Our main usage is with A/R invoice whereby we have approx 10 x users processing A/R invoices in remote locations (WAN, via 2 x Citrix Servers - both Dual Xeon 3.06Ghz with 4gb DDR RAM). We process some +9,000 A/R invocies per month with a total of approx 250,000 rows per month. We have recently upgraded from SBO2004A to SBO2005 SP01 PL18 and have noted a huge backwards step in system response time (performance). Copied below are some recent times recored:
    We also have local users (connected directly to SBO - not via Citrix) and the performce is good.
    Look fowards to your feedback as to how we can improve on this current situation which is costing us valuable time (and money)
    P.s Can you also send me a copy of the Performance Improvement Discussion. I am unable to download the file from the link in the forum.
    Thanks Ron
    [email protected]
    "12.29 seconds just to open an A/R Invoice (from when you click on A/R Invoice button to when it actually opens)
    43.28 seconds from when you click the final add on a credit to when the credit actually processes
    18.57 seconds from when you click the final add on an invoice to when the invoice actually processes
    58.08 seconds from when you click the first add on an invoice to when the invoice actually processes"
    When you multiply these times out by +9,000 A/R invocies. The problem is quite serious!

  • Performance improvement  from patching/upgrading wl 5.1

    Hi,
    We have started looking at a lot of issues that are currently affecting the performance of our web site. One thing that has been proposed as a potential area for improvement would be to patch/upgrade our weblogic servers.
    We are currently running 5.1 patched at level 4 on hpux.
    I was wondering if anybody could provide some info or point me to some documentation that would confim any actual gains we might get by patching our servers or upgrading them to 6.1
    Thanks,
    Karl

    Hi Karl,
    "Karl Raphael" <[email protected]> wrote in message
    news:3f4d6858$[email protected]..
    We have started looking at a lot of issues that are currently affectingthe performance of our web site. One thing that has been proposed as a
    potential area for improvement would be to patch/upgrade our weblogic
    servers.
    >
    We are currently running 5.1 patched at level 4 on hpux.
    I was wondering if anybody could provide some info or point me to somedocumentation that would confim any actual gains we might get by patching
    our servers or upgrading them to 6.1
    You should definitely consider upgrading to the newest 8.1.
    It offers a lot of performance improvements, including normal
    connection pools and prepared statement caches, CMP batching
    and many others. There is no reason for upgrading to 6.1
    when 8.1 is out.
    If such a long jump is not an option, at least you may upgrade
    to the latest SP for 5.1 - you will get caching for prepared
    statetements - if your app is database-bound, it will definitely
    give a boost.
    Regards,
    Slava Imeshev

  • How To make certain that a page is removed from memory, silverlight

    
    Hello,
    I have a big solution with several branches. These branches was tested individually for errors and memory issues, using VS profiler and debugger. A final solution was found that at highest with animations and music peaked to 100mb, of course high but should
    not be an issue for Windows phone applications, even for low end devices. The branches was then collected to one main branch. A new test was run, and suddenly the memory spiked up towards 200mb and crashed on phones and emulators with out of memory exception.
    We at the team then tried:
    protected override void OnNavigatedTo(NavigationEventArgs e)
    if (App.RootFrame.CanGoBack)
    App.RootFrame.RemoveBackEntry();
    GC.Collect();
    base.OnNavigatedTo(e);
    This was discussed on forums to help with page memory leakage, this however did not solve the issue. We therefore wanted to investigate if pages and other elements got deconstructed and GC.Collected. This we did by implementing deconstructors:
    ~SecondScreen()
    In_Game_Crest = null;
    currentViewModel = null;
    This confirmed our fears that the pages, popups and controls did not get garbage collected, even if we sat everything to null, or
    set everything to private functions. Our code is implemented in a MVVM structure, we therefore looked to ViewModelLocator, and removed the servicelocator, as to force a new viewmodel creation for every page creation.
    This showed that the viewmodels got garbage collected upon navigation, but the views and usercontrols did not. We therefore searched around for the issue and found some links that could help us, referring to IDisposable, we therefore tried with the following
    implementation:
    private bool disposed = false;
    public void Dispose()
    Dispose(true);
    // Take yourself off the Finalization queue
    // to prevent finalization code for this object
    // from executing a second time.
    GC.SuppressFinalize(this);
    protected virtual void Dispose(bool disposing)
    // Check to see if Dispose has already been called.
    if(!this.disposed)
    // If disposing equals true, dispose all managed
    // and unmanaged resources.
    if(disposing)
    // Dispose managed resources.
    currentView = null;
    popup = null;
    Image1 = null;
    Image2 = null;
    // Release unmanaged resources. If disposing is false,
    // only the following code is executed.
    this.Content = null;
    // Note that this is not thread safe.
    // Another thread could start disposing the object
    // after the managed resources are disposed,
    // but before the disposed flag is set to true.
    // If thread safety is necessary, it must be
    // implemented by the client.
    disposed = true;
    // Use C# destructor syntax for finalization code.
    // This destructor will run only if the Dispose method
    // does not get called.
    // It gives your base class the opportunity to finalize.
    // Do not provide destructors in types derived from this class.
    ~FirstPage()
    Dispose(false);
    protected override void OnNavigatedFrom(NavigationEventArgs e)
    this.Dispose();
    base.OnNavigatedFrom(e);
    This however only increased the memory usage by 20 mb, for every call to dispose. Which hopefully would mean that we have misunderstood the use of IDisposable.
    Questions:
    Therefore quite confused, I have learned from my similar question on Stackoverflow, that I should use the VS profiler more intently to find references, but I have not succeeded in finding anything with the profiler. And I do not understand why the
    deconstructors are not fired when I know no references exists.
    Therefore would it help to implement IDisposable and how should it be done in a windows phone Silverlight context?
    Should I do something specific when I utilize the MVVM structure?Any proposals on how to force the deletion and how to do the deletion correctly?
    Or is there some other way to go about it, to ensure that pages with all information is removed.
    Hope for any help, If you want stackoverflow points I also have the following: stackoverflow.com/questions/27744091/implementing-dispose-and-finalize-for-windows-phone-silverlight-pages/

    One way i can suggest is to use 'Using' statement(obviously if not already did that) wherever it is required to work with resources such as opening a connection to database, file operations etc. With this, the resources are disposed automatically as soon
    as 'Using' block goes out of scope.
    e.g.
    using (StreamReader reader = new StreamReader("somefile.txt"))
    your code
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

Maybe you are looking for

  • Best options for life (gulp) after iWeb...

    Hey Gang, Been using iWeb since its inception. I've learned to love it. Well- with the begining of iCloud and the transition away from MobileMe I see the writing on the wall. I realize alot of people will continue to use iWeb but I want to be proacti

  • Adobe Illustrator CC crashes on Mac OS X 10.9

    It crashes when it starts, no error messages, just crash... But it works fine with root account. What's the problem?

  • Smart form for a invoice

    Dear All, We have designed a smart form for printing of excise invoice. The invoice is in two pages. The second page printing is not aligned and starts immediately after the finish of the 1st page. There is no buffer place between two pages. How can

  • RFE..  request for enhancement  Unified Storage (ak)

    Hi, Maybe I've missed something, but is it any plans for possibility to enable krb5 as share options on a NFS-share? I would like to be able to do what I do on a "plain" opensolaris fileserver: 1) uncomment krb5 lines in /etc/nfssec.conf 2) #zfs set

  • Errors "Load tModels into the registry" option & publishing proxy services

    Hi, I'm making a study with BEA Aqualogic Service Bus and BEA Aqualogic Service Registry. Reading official documentation (Console Help), I added with the BEA ALSB Console two registries. But during the configuration it doesn't allow me to set the *"L