🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: killing objects

#7786
From: ArShAm
Date: Mon, 14 May 2001 14:00
45 lines
2325 bytes
    Thanks a lot Valentino Kyriakides
When I pass my object to another method , there is two refrence now , one in
caller method , and the other in invoked method , now is there any way to
free the object or not?
When I make a Vector and then remove one , then when gc invoked , is it free
or not?
How is the story about the sockets? is it like the other objects or not?
When the application ends , are all the objects get free?

Thanks for your help
    ArShAm



> After setting an object to null, you can call the garbage collector:
>
> System.runFinalization();
> System.gc();
>
> Note however, that it depends on the GC if he likes to immedeately free up
> previously consumed memory or not. In other words, there is no warranty
that
> the GC will do this straight when called. Also if there are otherwere in
> your prog possible dangling references to the released object (object =
> null), the GC will not free it up until those references have been
released
> too.
>
> Valentino
>
> "ArShAm" <ArShAm@abshar.net> schrieb im Newsbeitrag
news:3aff22d5_1@dnews...
> >     Hi there
> > How to make sure an object is killed?
> > I mean explain me when I make an object to null , what happens exactly?
is
> > the memory freed? or not?
> >
> > if not , how to free the memory?
> > Thanks
> >     ArShAm
> >
> >
>
>
Technical Details
Message-ID: <9doo83$jgihv$1@ID-89294.news.dfncis.de>
Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!61.11.252.154!not-for-mail
References: <3aff22d5_1@dnews> <3affa619_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,d2ac741b1b0a7362
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-05-14 06:58:07 PST
Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!61.11.252.154!not-for-mail
From: "ArShAm" <ArShAm@abshar.net>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: killing objects
Date: Mon, 14 May 2001 18:30:18 +0430
Lines: 47
Message-ID: <9doo83$jgihv$1@ID-89294.news.dfncis.de>
References: <3aff22d5_1@dnews> <3affa619_2@dnews>
Reply-To: "ArShAm" <ArShAm@abshar.net>
NNTP-Posting-Host: 61.11.252.154
X-Trace: fu-berlin.de 989848685 20466239 61.11.252.154 (16 [89294])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700