🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.programmer
Article #583

Re: How to force swing window to destroy

#583
From: rocha
Date: Fri, 26 May 2000 00:00
41 lines
2595 bytes
I see that there is a way to get a window/frame's owned windows, but there is
no way to remove a window from that list.  if that is the case, that implies
that through out the life of a swing application, every window ever
instantiated will never be freed( which of course makes no sense to me ).  I
would imagine that there is a way to release a window from it's owner.  I just
don't know how

Rijk van Haaften wrote:

> On Fri, 26 May 2000 10:17:30 +0100, rocha <rocha@haisystems.com>
> wrote:
>
> . I have an application which instantiates many different windows.  as the
> . application progresses, the performance degrades.  I have traces this
> . problem to the fact that none of the windows are being destroyed until
> . the application terminates and they are holding a lot of memory.  it
> . seems to me that something is still holding a reference to the windows(
> . possible the parent window), but i  don't know how to force there
> . destruction.  does anyone know how to do this?  thanks in advance
> . Ilougino Rocha.
>
> Parts (not all!) of the work can be done with dispose:
>
> java.awt.Window.dispose()
>
> dispose
>
> public void dispose()
>
>      Releases all of the native screen resources used by this Window,
>      its subcomponents, and all of its owned children. That is, the
>      resources for these Components will be destroyed, any memory they
>      consume will be returned to the OS, and they will be
>      marked as undisplayable.
>
>      The Window and its subcomponents can be made displayable again by
>      rebuilding the native resources with a subsequent call
>      to pack or show. The states of the recreated Window and its
>      subcomponents will be identical to the states of these objects at
>      the point where the Window was disposed (not accounting for
>      additional modifcations between those actions).
Technical Details
Message-ID: <392E5D47.7F071D45@haisystems.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <392E412A.8259351@haisystems.com> <392e93ec.43651858@news>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb99b,dc33438d3c04e295
X-Google-Attributes: gidfb99b,public
X-Google-Thread: 10a146,dc33438d3c04e295
X-Google-Attributes: gid10a146,public
From: rocha <rocha@haisystems.com>
Subject: Re: How to force swing window to destroy
Date: 2000/05/26
Message-ID: <392E5D47.7F071D45@haisystems.com>
X-Deja-AN: 627640562
Content-Transfer-Encoding: 7bit
References: <392E412A.8259351@haisystems.com> <392e93ec.43651858@news>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Trace: 26 May 2000 12:18:03 -0400, host-40.haisystems.com
MIME-Version: 1.0
Newsgroups: comp.lang.java.programmer,cz.comp.lang.java