The Artima Developer Community
Sponsored Link

Java Answers Forum
Serializable Objects

4 replies on 1 page. Most recent reply: Jun 29, 2002 6:53 PM by Senthoorkumaran Punniamoorthy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
Guest
Serializable Objects Posted: Feb 28, 2002 3:57 PM
Reply to this message Reply
Advertisement
I have a java application using Serialized Objects for messages between the server app and the client GUI. The problem is: On the client app the memory keeps growing, my thoughts are that the serialized objects are being retained in the client memory space. Is there a way to force these objects to be removed from memory after I take the information I need from these objects?


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Serializable Objects Posted: Mar 1, 2002 1:54 AM
Reply to this message Reply
Can you provide some more detail and maybe some code? Maybe you are keeping the references to these objects around, so they are never collected...

Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: Serializable Objects Posted: Mar 1, 2002 9:00 AM
Reply to this message Reply
All you have to do according to my knowledge is to null the object after using it....

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: Serializable Objects Posted: Mar 4, 2002 12:25 AM
Reply to this message Reply
You just release deserialized objects for garbage collection like any other object. Get rid of all references to them.

If you're doing dynamic class loading, then the dynamically loaded classes are also taking up memory. I highly doubt this is your problem, but some discussion of how to get classes garbage collected is here:

http://www.artima.com/insidejvm/ed2/ch07LifetimeOfAType6.html

And here:

http://www.artima.com/insidejvm/ed2/ch08TheLinkingModel19.html

Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: Serializable Objects Posted: Jun 29, 2002 6:53 PM
Reply to this message Reply
Bill, lets please get back to the old format of these fourms. That was more easier to track and work with.

Flat View: This topic has 4 replies on 1 page
Topic: Runtime.getRuntime.exec() Previous Topic   Next Topic Topic: Question abotu Runtime.exec()

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use