🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2588

Re: Why Java Program eats Memory?!

#2588
From: Joi Ellis
Date: Tue, 19 Sep 2000 00:00
44 lines
1690 bytes
banxuegang wrote:
> 
> HI,
> Thank you for your help. But it is hard to post my source codes here, it is
> too long.
> But something like below:
> 
> class myThread1  extends Thread
> {
> ......
> public void main()
> {
>     myThread1 t1=new myThread1();
>     myThread1 t2=new myThread1();
>     t1.start();
>     t2.start();
> }
> 
> public void run()
> {
>     while(true)
>     {
>          myThread2 mt2=new myThread2();
>         mt2.start();
>         ....
>     }
> }

Erf.  Okay, so every type this loop runs, you're firing
off a new thread.  Do you ever assign null back to mt2?
Is anything else storing a reference to mt2?

Does mt2.run() ever exit?



--
Joi Ellis                    Software Engineer
Aravox Technologies          joi@aravox.com, gyles19@visi.com

No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried.  Anything
that kicks a monopoly in the pants has got to be good for something.
           - Chris Johnson
Technical Details
Message-ID: <39C7D2AE.9BC2E7D0@aravox.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39c28555$1_2@dnews> <39C6DA10.C8A4B4D2@aravox.com> <39c77da2$1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,80c63c7225823056
X-Google-Attributes: gid1089d0,public
From: Joi Ellis <joi@aravox.com>
Subject: Re: Why Java Program eats Memory?!
Date: 2000/09/19
Message-ID: <39C7D2AE.9BC2E7D0@aravox.com>
X-Deja-AN: 671773453
Content-Transfer-Encoding: 7bit
References: <39c28555$1_2@dnews> <39C6DA10.C8A4B4D2@aravox.com> <39c77da2$1_2@dnews>
To: banxuegang <ban@cae.wisc.edu>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Aravox Technologies
Mime-Version: 1.0
Reply-To: joi@aravox.com
Newsgroups: borland.public.jbuilder.java.api