Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

can an object instance be removed ?
Hi all,

I've got a question about removing an object instance. Is there a way
to force an object instance to be removed (within it's scope) just
like it would be removed if it would get outside the scope. Kind of
like a "reversed new".

Best regards,
Rick

Report this thread to moderator Post Follow-up to this message
Old Post
Rick D.
12-28-04 01:57 AM


Re: can an object instance be removed ?
The only thing you can do is remove references to the object and it
will be marked for garbage collection. However, there is no guarantee
that it will be garbage collected.


Report this thread to moderator Post Follow-up to this message
Old Post
klynn47@comcast.net
12-28-04 01:57 AM


Re: can an object instance be removed ?
Rick D. wrote:
> Hi all,
>
> I've got a question about removing an object instance. Is there a way
> to force an object instance to be removed (within it's scope) just
> like it would be removed if it would get outside the scope. Kind of
> like a "reversed new".
>
> Best regards,
> Rick

Not explicitly in Java. You can make sure there
are no references to the object (e.g. if there's a local
variable that references the object, assign it to
null.) Then you can call System.gc() to force
immediate garbage collection. Why do you need to
do this specifically?

Jose Solorzano


Report this thread to moderator Post Follow-up to this message
Old Post
jhsolorz@hotmail.com
12-28-04 09:00 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Help archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:18 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.