Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Advanced-java] Memory problem
- From: vesselinpeev@xxxxxxxxxxx (Vesselin Peev)
- Subject: [Advanced-java] Memory problem
- Date: Sun, 3 Mar 2002 13:10:32 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_008A_01C1C2B4.CCE0A220
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Julien,
Also, keep in mind that calling System.gc() is just a suggestion to the =
VM, not a command.
If the VM has another opinion, thinking it is not so low on resources, =
it would not actually invoke the garbage collector.
So you should take care to call System.gc() at the appropriate places =
where it is most likely that memory is low.
Regards,
Vesselin.
----- Original Message -----=20
From: Vesselin Peev=20
To: Julien Robinet=20
Cc: advanced-java@xxxxxxxxxxxxxxxxxxxxxx=20
Sent: Monday, April 01, 2002 11:51 AM
Subject: Re: [Advanced-java] Memory problem
Julien,
Call System.gc() to invoke the garbage collector manually at the =
places you need.
Of course, before doing it, you still need to ensure unneeded objects =
are null or are out of scope and not referenced.
You should get immediate relief ;-)
Hope that helps.
----- Original Message -----=20
From: Julien Robinet=20
To: advanced-java@xxxxxxxxxxxxxxxxxxxxxx=20
Sent: Monday, April 01, 2002 9:51 AM
Subject: [Advanced-java] Memory problem
Hi all,
=20
We are developping a client-server application with Jbuilder. In =
this application we display very large tree view. If we close the =
windows containing tree view and open again, error appears because of =
lake of memory.
we would like to unforce the garbage collector(possible?) to clean =
up memory when closing the windows containing tree-view...or cleanup the =
memory with other way. We try to set to null value every object in class =
(in finalize method) but no result always the same mather.
Do someone have good idea to solve such a problem.
=20
Thank o lot in advance
=20
Julien Robinet
=20
------=_NextPart_000_008A_01C1C2B4.CCE0A220
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word" xmlns:st1 =3D=20
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3DWord.Document name=3DProgId>
<META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR>
<META content=3D"Microsoft Word 10" name=3DOriginator><LINK=20
href=3D"cid:filelist.xml@xxxxxxxxxxxxxxxxx" =
rel=3DFile-List><o:SmartTagType=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"=20
name=3D"PersonName"></o:SmartTagType><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<STYLE>st1\:* {
BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
span.EmailStyle17
{mso-style-type:personal-compose;
mso-style-noshow:yes;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:Arial;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:windowtext;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</STYLE>
<!--[if gte mso 10]>
<style>
/* Style Definitions */=20
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=3DEN-US style=3D"tab-interval: 36.0pt" vLink=3Dpurple =
link=3Dblue=20
bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Julien,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Also, keep in mind that calling =
System.gc() is just=20
a suggestion to the VM, not a command.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If the VM has another opinion, thinking =
it is not=20
so low on resources, it would not actually invoke the garbage=20
collector.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So you should take care to call =
System.gc() at the=20
appropriate places where it is most likely that memory is =
low.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Vesselin.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A title=3Dvesselinpeev@xxxxxxxxxxx=20
href=3D"mailto:vesselinpeev@xxxxxxxxxxx">Vesselin Peev</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Djulien_r@xxxxxxxxx=20
href=3D"mailto:julien_r@xxxxxxxxx">Julien Robinet</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Cc:</B> <A=20
title=3Dadvanced-java@xxxxxxxxxxxxxxxxxxxxxx=20
=
href=3D"mailto:advanced-java@xxxxxxxxxxxxxxxxxxxxxx">advanced-java@lists.=
xcf.berkeley.edu</A>=20
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, April 01, 2002 =
11:51=20
AM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: [Advanced-java] =
Memory=20
problem</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2>Julien,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Call System.gc() to invoke the =
garbage=20
collector manually at the places you need.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Of course, before doing it, you =
still need=20
to ensure unneeded objects are null or are out of scope and not=20
referenced.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>You should get immediate relief=20
;-)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Hope that helps.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A title=3Djulien_r@xxxxxxxxx =
href=3D"mailto:julien_r@xxxxxxxxx">Julien=20
Robinet</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
title=3Dadvanced-java@xxxxxxxxxxxxxxxxxxxxxx=20
=
href=3D"mailto:advanced-java@xxxxxxxxxxxxxxxxxxxxxx">advanced-java@lists.=
xcf.berkeley.edu</A>=20
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, April 01, 2002 =
9:51=20
AM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Advanced-java] =
Memory=20
problem</DIV>
<DIV><BR></DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt">Hi all,<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt">We are <SPAN =
class=3DSpellE>developping</SPAN> a=20
client-server application with <SPAN class=3DSpellE>Jbuilder</SPAN>. =
In this=20
application we display very large tree view. If we close the windows =
containing tree view and open again, error appears because of lake =
of=20
memory.<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><SPAN class=3DGramE><FONT face=3D"Times New =
Roman"=20
size=3D3><SPAN style=3D"FONT-SIZE: 12pt">we</SPAN></FONT></SPAN> =
would like to=20
<SPAN class=3DSpellE>unforce</SPAN> the garbage collector(possible?) =
to clean=20
up memory when closing the windows containing tree-view...or cleanup =
the=20
memory with other way. We try to set to null value every object in =
class (in=20
finalize method) but no result always the same <SPAN =
class=3DSpellE><SPAN=20
class=3DGramE>mather</SPAN></SPAN>.<o:p></o:p></P>
<P class=3DMsoNormal><SPAN class=3DGramE><FONT face=3D"Times New =
Roman"=20
size=3D3><SPAN style=3D"FONT-SIZE: 12pt">Do</SPAN></FONT></SPAN> =
someone have=20
good idea to solve such a problem.<o:p></o:p></P>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt">Thank o lot in =
advance<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><st1:PersonName><FONT face=3D"Times New Roman" =
size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt">Julien</SPAN></FONT></st1:PersonName> =
<SPAN=20
class=3DSpellE>Robinet</SPAN><o:p></o:p></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p> </o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BLOCKQUOTE=
></BODY></HTML>
------=_NextPart_000_008A_01C1C2B4.CCE0A220--
- References:
- [Advanced-java] Memory problem
- From: Julien Robinet
- [Advanced-java] Memory problem
- Prev by Date: [Advanced-java] changing line style in graphics2D
- Next by Date: [Advanced-java] Is there a JavaDoc of Sun JDK1.3.1 ?
- Previous by thread: [Advanced-java] Memory problem
- Index(es):