Diference between close() and dispose()

in Java Swings we had two methods to close a JFrame, i.e frame.dispose() and frame.hide() / or frame.setVisible(false).
But in FX, we have a single methos to close the stage which is : Stage.close() and it is equivalent to hide().
So does that mean, on calling stage.close(), the memory and the resources allocated to the stage remain intact and the stage is only vanished from the screen?
Does that further imply, FX doesnt have any method to comple 'dispose' of the stage as in swings?
please reply
Edited by: 949779 on Jul 30, 2012 6:17 AM

The docs donot say anything about the resource management done by Stages. Comparing it with Swing is useless since they're completely different.
The reason for dispose() in Swing was that even when your code does not refer to a JFrame anymore, there are still native resources which refer to the JFrame which will keep it from being garbage collected. Dispose() releases those resources.
In JavaFX the distinction between close and dispose is probably no longer needed because using weak refs they can track when the Stage is no longer referenced anymore and then release all resources associated with it (if it works that way at all).
So, close() would 'hide' the Stage, and when it gets garbage collected an automatic 'dispose' occurs. If Stages needed any further special treatment I would expect a mention in the docs.

Similar Messages

  • What is the diference between pane and panel?

    What is the diference between pane and panel?
    Thanks.

    The panel is the UI part of the VI. It can be divided into several panes which are simply different parts of the same panel, which can have seperate scrollbars, etc.
    Try to take over the world!

  • Diference between STO and Shipment order?

    Hi All ,
    There are two plants , one is manufacturing and other is sales .  In sales plant sales order is created and after MRP run Purchase requisition is created(for getting materisl from production plant) . In me59 we convert this Preq to shipment order.
    1)Can oyu please tell me whant is diference between STO and shipment order?
    2) Can you tell me what is the configuration to avoid creation of shipment order and system will only create the STO from Preq after executing Me59?
    Thanks
    Rohit Chavan

    Hi Chavan,
    Starting with "Shipmnt Order" definition => (from SAP Help):
       An order to a transportation service provider to ship goods from a shipper to a single consignee with agreed terms and conditions. The corresponding confirmation from the transportation service provider is also part of the business object.
       You can use this business object to subcontract the transportation of goods from a shipper to a single consignee if you cannot fulfill a shipment request yourself or if you regularly subcontract transportation services.
       You can also use this business object in the process of transportation service provider selection and tendering. The aim of both processes is to assign a suitable transportation service provider (TSP) to a shipment order.
    http://help.sap.com/saphelp_tm60/helpdata/en/66/dda98bb6b64c30b925f031bb0a2023/content.htm
    STO is just Stock Transport Order => functionality to move stock from one plant to another plant in two steps( inclidung GI in the sending plant and GR in the receiving plant).
    Usuall documnt flow in the STO process => PO(UB or NB order type), delivery, GI -> GR (done via migo for example).
    I believe that you can avoid cration of the Shipmnt order via correct selection on ME59 screen. Just something what is characteristic for STO and not for Shipmnt Orders.
    Best Regadrs,
    Tomek.

  • Diference between DATA: and TYPES: on internal tables

    Hi people,
    Can somebody help me. I wanna know whats the diference between DATA: and TYPES: on internal tables
    and whitch has the best performance, here is a eg:
    DATA: BEGIN OF ti_sbook occurs 0,
              carrid   LIKE sbook-carrid,
              fldate   LIKE sbook-fldate,
              customid LIKE sbook-customid,
              loccuram LIKE sbook-loccuram,
           END OF ti_sbook.
    AND
    TYPES: BEGIN OF ti_sbook ,
              carrid   LIKE sbook-carrid,
              fldate   LIKE sbook-fldate,
              customid LIKE sbook-customid,
              loccuram LIKE sbook-loccuram,
           END OF ti_sbook.
    DATA: gw_sbook       TYPE  TABLE OF ti_sbook,
    gs_sbook       TYPE ti_sbook.
    witch of both types is better?
    thanks.

    Hi Marcelo,
    For compatibility matters is better to create internal tables with a work area separately. So yes it's better to use types. When you work with Object Oriented coding you will need to use internal tables defined with types. Also when defining tables with types is the new way of coding, the another coding is getting obsolete defined by SAP. That's why when working in ABAP with OO (Object Oriented) code you'll have to define tables with types and not the other way.
    Hope it helps.
    Regards,
    Gilberto Li

  • Illustrator extension persistence between close and open again

    I'm creating a extension in eclipse that redirect the panel to one web where I login and i've the possibility to login and remember the user.
    All works fine but if I close illustrator and open again, I think that it doesn't save this information and I must login again.
    I'm using windows 8 and chrome as default browser.
    It's something about cookies configuration?. In chrone are activated.
    How can I activate persistence of the variables from my extension between close and open illustrator? It is a web app.
    Best regards,
      Couso

    Hi,
    CEP (which contains CEF for HTML5 extensibility support) only supports session cookies at this time.
    Best regards,
    Hallgrimur

  • Doubt about diference between SAPconsole and SAPmobile

    Hello,
         I have been many doubts about diference between sapconsole and sapmobile, if anyone could help me I appreciate.
    1) I have ECC6 instaled, the SAP Mobile is compatible with ECC6 or I need of Netweaver Instaled ?
    2) If Possible to Install Sap Mobile in ECC6 , I have to Buy a license of sap mobile ?
    3) in any product instaled Windows CE have possible to install sap mobile ?
    4) In sap console what is the requirement for to do this configuration?
    I Anybody to know about this informations please explain for me ?
    Thanks

    My apology, 
        The Basic Diference beteween SAPConsole and SAPMobile is :
    SAPConsole ==>  
    1 ) Don' t need a new Hardaware for to configurate
    2 ) Only need a Machine with the IIS service installed
    3 ) The SAPGui CD content the SAPCOnsole.exe for configuration
    4 ) The equipment like Pocket and datacolletor has been to configurated in a Network( but if to have a entrance in the SAPGUi indicate a SAProuter in another factory is possible to have acesses.. ) is a mandatory. Cause the SAPCOnsle folow the SAPGUI entrances and need a LAN or a WAN configurated.
    Advantage
    simple to congurated and chip.
    Easy to create to new window cause the SAPConsole only plubish this window in Browser.
    Disadvantage
    Need a lincense for each Poket or Datacolletor, wherever the equipment you will use.
    Doesn't have a Database  using through Browser (IE6 or IE7) this way , during the processes lost network you go to lost the information not saved.
    SAPMobile
    1 ) Need the a good Machine  with a instance of SAP configurate
    2 ) Have to found the EXE in the MarketPlace
    3 ) is not publish, and yes a client with the database configurate in equipment
    4 ) The equipment like Pocket and datacolletor has been to configurated in a Network
    Advantage
    Need only one SAP License, doesn't metter how many equipment  in use you have.
    As the SAPMobile has a Database in the client , if you lost the network it goes to save in the local database and when the network come back , it will to synchronize. This way you don't need to work online every moment, you get to synchronize after.
    Disadvantage
    You profit in license is your lost in the Machine cause the price of Machine is expensive.
    is configurate only in windows Mobile.
    The window only can be create for a Developement and not in the SAP, have been created in windows Mobile.
    A tip, the both is good but you can do a simple mathematics.
    In the SAPConsole how much money you go to spend is the least of the Machine s Price.
    If yes confurate the SAPConsole , if not configurate the SAPMobile

  • Diference between SCP and FTPS

    Hi, people,
    Some know the diference between SCP and FTPS because I need to make a connection in one interface and I need to know the diference.
    Thanks!!

    Hi,
    have a look at this page:
    http://geekswithblogs.net/bvamsi/archive/2006/03/23/73147.aspx
    and check sections:
    FTPS (FTP-SSL)
    and
    SCP (Secure Copy)
    Regards,
    michal

  • Diference between choice and message choice

    Hi
    I'm testing UIX. What is the diference between choice and message choice? When I can use this components?
    Thanks
    Liceth

    The messageChoice control is a combination of the choice and messageLayout controls. You can read about all the components in JDeveloper's help.
    The messageLayout control lays out a prompt, indexed children, end child, tip, and inline message (error message that displays below the choice, for example). Typically, the only indexed child of this bean will be a form element of some sort, but as many children as necessary can be added.
    The prompt can have an icon associated with the type of message. The bean's destination is attached to the icon to link to further information. It is also possible to indicate that user input is required.
    Clients can also add an "end" named child which will be rendered after the indexed children.
    To lay out multiple messageLayout beans the messageComponentLayout bean should be used. When messageLayout beans are placed inside a tableLayout or labeledFieldLayout the prompts will line up.
    Jeanne

  • Diference between RAC and Grid

    I have 9i r2 RAC.
    What is the diference between 10G RAC and 10g Grid?
    What are my options to migrate?
    What are the advantages and disadvantages between migrating to 10g RAC or migrating to 10g Grid?

    A lot of the differences are cosmetic. Parallel server in 8i became RAC in 9i became Grid in 10g. There is no such thing as 9i Parallel Server, nor is there such a thing as 10g RAC, at least from a marketing standpoint. Once you understand that, the major differences are incremental-- 10g is probably more maintainable and easier to set up than 9i, 10g is probably more scalable as well.
    Migration is just a database upgrade. The upgrade guide will enumerate your options.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Diference between Consolidate and consolidate all with data

    I would like to get clarified on the differences between "Consolidate" and "Consolidate All" option in HFM while performing a consolidation.

    Consolidate finds only the part of the data that is impacted by changes and performs all calculation, translation and consolidation rules for only that part of data.
    Consolidate All on the other hand calculates everything even if there are no underlying changes
    Consolidate All With Data performs as the Consolidate All it skips entities that have no data inputted though

  • Oo diference between delpi and Java.

    I want to know what the oo differences are between java and delphi. I always thought delphi was a old not very advanced language, but I found out it supports encapsulation, inheritance, polymorfism and even interfaces.

    What OO differences are you concerned about, specifically?
    I've been away from Pascal since the '80s, so I don't know much about Delphi.
    Regardless, I would look into the following OO feature comparison (off the top of my head):
    - Multiple inheritance
    - Inner classes
    - Interfaces
    - Name Spaces
    - Type Safety
    - Garbage Collection / Memory Management
    - Reflection

  • Diference between MB51 and MC$I

    Hi
    Please tell me the Difference between MB51 and MC$I.
    Best regards
    Sarang

    Hi,
    T code:  MB51 - It is the List of all Material Documents for Plant/Storage loc and Posting dates
    Where as MC$I - Material analysis for purchasing quantities selection..
    tx
    Uts
    Award if helpfull

  • Diference between structure and infostructure

    Hi All!
    What is the difference between structure and infostructure in SAP.What are the pros and cons.
    Please provide me any analysis on this?
    Regards
    Praneeth

    hi Praneeth,
    <b>Structure:</b>In structure there will be no data present.
    Only the tables contains data.
    Structures are meant for temporary passage of data and we can include tht structure in any tables..
    Check these links
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/11afb6d55711d2b1f80000e8a5b9a5/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/6b/9f97e674547b4fa7e33e5d36cea248/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/61/d25eb4166811d2a2380000e8a5f24f/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ff/6bb43b3d4a7958e10000000a114084/frameset.htm
    Regards,
    Santosh

  • Diference between button and toggle button

    hai
    can any one tell diference betwwen button and toggle button

    hii
    The UI element ToggleButton represents the pushbutton on the screen. The user can execute statements and actions by clicking the ToggleButton. Action executed when the user toggles the UI element.
    A toggle button has two states: pushed in, or not pushed in. It stays pushed after you have pushed it and comes out after you have pushed it again.
    A simple button just comes out every time after being pushed.
    Reward Points if helpful

  • Diference between "Page" and "Page Forward"

    Friends,
    what is the differene between "Page" and "Page Forward" in the Struts component palette?
    Thanks!

    "Page" represents a page (like JSP, UIX, or HTML page)
    The user would browse this page by typing something like:
    http://somesite/someapp/somepage.jsp
    "PageForward" is a Struts action whose only job in life is to forward control to an underlying page.
    The user would browse this page by typing something like:
    http://somesite/someapp/somepage.do
    Since in an MVC architecture, typically you want all browser requests to go through your controller layer, that means that you typically don't want a user to short-circuit the controller layer by jumping straight to a *.jsp page (for example, by bookmarking that page in their browser's "favorites" list)
    So, does that mean you should always use page forwards?
    I personally don't think so, although some Struts developers may have a differing opinion than me.
    Even if you create a page forward as a "front" for the underlying *.jsp page, if the user knows the URL to the *.jsp page directly, they can still short-circuit your controller layer.
    So, what's really the best practice?
    Put your JSP pages in a subdirectory of your ./WEB-INF directory as the BC4J Toy Store demo illustrates. The WEB-INF directory and any subdirector thereof, is by the J2EE specifications NOT BROWSEABLE from the outside of the J2EE web container. So, doing this prevents users from ever being able to browse your JSP pages.
    If you adopt this practice, then you will typically have a Struts diagram that consists of Actions which forward to Pages (that are under ./WEB-INF). Even though the JSP pages under ./WEB-INF are not externally browseable, it is legal for code in the web tier (like your Struts controller layer code) to forward to such pages.
    Net net, with this best practice, you are always in control.

Maybe you are looking for