🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #657

Static Methods with local objects Question

#657
From: Lans Redmond
Date: Sat, 01 Jan 2005 02:01
9 lines
1677 bytes
I'm running a program through a profile and I notice that each time I call a 
static method, a local object that I create inside this static method keeps 
growing and is not being freed when the GC runs.

How long before these obejcts get removed from the heap?

Does local objects created inside a static object ever get released?  This 
method is called many times so the object will not go out of scope.  Does 
this mean that I will eventually run out of memory? 
Technical Details
Message-ID: <HvnBd.10383$qf5.5559@newsread3.news.atl.earthlink.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!chi1.usenetserver.com!news.usenetserver.com!pd7cy2so!pd7cy1no!shaw.ca!elnk-pas-nf1!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!05a75e28!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,1c8f2f9f1fdf1d3e,start
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!chi1.usenetserver.com!news.usenetserver.com!pd7cy2so!pd7cy1no!shaw.ca!elnk-pas-nf1!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!05a75e28!not-for-mail
From: "Lans Redmond" <sirlanslot@earthlink.net>
Newsgroups: borland.public.jbuilder.java.language
Subject: Static Methods with local objects Question
Lines: 11
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <HvnBd.10383$qf5.5559@newsread3.news.atl.earthlink.net>
Date: Sat, 01 Jan 2005 02:01:11 GMT
NNTP-Posting-Host: 24.110.97.165
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread3.news.atl.earthlink.net 1104544871 24.110.97.165 (Fri, 31 Dec 2004 18:01:11 PST)
NNTP-Posting-Date: Fri, 31 Dec 2004 18:01:11 PST
Organization: EarthLink Inc. -- http://www.EarthLink.net