RE: JESS: [EXTERNAL] Question on QueryResult close() function

"Friedman-Hill, Ernest" <[email protected]> Fri, 28 Jun 2013 13:21:50 +0000
Newsgroups gmane.comp.java.jess
Message-ID <[email protected]>
--_000_7F2CAF6713AFDD4392FC4DAA05671E072C7EBD9BEXMB10srnsandia_
Content-Type: text/plain;
 charset=us-ascii
Content-Transfer-Encoding: quoted-printable

Hi Daniel,

Closing a QueryResult doesn't really do anything important; normal garbage =
collection will free all of its resources.

I used Google to see if there was a standard Jess/Matlab integration that I=
 didn't know about, but I didn't find one; I'm afraid I don't know anything=
 about how Jess and Matlab are typically used together. Jess does "warm up"=
 for a few iterations if run repeatedly with the same rules - i.e., "(reset=
)" won't necessarily get you back to the same memory usage as before the fi=
rst run - but this levels off quickly. It would be a good idea to run a hea=
p analyzer tool to see what kind of objects are being leaked; that might gi=
ve us a clue as to what's happening.

From: [email protected] [mailto:[email protected]] On B=
ehalf Of Daniel Selva
Sent: Thursday, June 27, 2013 12:53 PM
To: jess-users
Subject: JESS: [EXTERNAL] Question on QueryResult close() function

Hi,

I am experiencing a memory leak problem in a Matlab-Jess application and I =
am trying to locate the leak. I came across the definition of the close() m=
ethod of the QueryResult class. I have never called this method after using=
 queries.

1) Should I call close() after using a query?
2) Could not calling close() be the cause of the leak?

If not, I would appreciate any tips on typical causes of leaks in Matlab-Je=
ss applications.

Thanks in advance,

Daniel

--_000_7F2CAF6713AFDD4392FC4DAA05671E072C7EBD9BEXMB10srnsandia_
Content-Type: text/html;
 charset=us-ascii
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi Daniel,<o:p></o:p></sp=
an></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,&quot;sans-serif&quot;;color:#1F497D">Closing a QueryResult doe=
sn&#8217;t really do anything important; normal garbage collection will fre=
e all of its resources.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,&quot;sans-serif&quot;;color:#1F497D">I used Google to see if t=
here was a standard Jess/Matlab integration that I didn&#8217;t know about,=
 but I didn&#8217;t find one; I&#8217;m afraid I don&#8217;t know anything =
about
 how Jess and Matlab are typically used together. Jess does &#8220;warm up&=
#8221; for a few iterations if run repeatedly with the same rules &#8211; i=
.e., &#8220;(reset)&#8221; won&#8217;t necessarily get you back to the same=
 memory usage as before the first run &#8211; but this levels off quickly.
 It would be a good idea to run a heap analyzer tool to see what kind of ob=
jects are being leaked; that might give us a clue as to what&#8217;s happen=
ing.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><=
/p>
<p class=3D"MsoNormal"><b><span style=3D"font-size:10.0pt;font-family:&quot=
;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style=3D"font-s=
ize:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> owner-je=
[email protected] [mailto:[email protected]]
<b>On Behalf Of </b>Daniel Selva<br>
<b>Sent:</b> Thursday, June 27, 2013 12:53 PM<br>
<b>To:</b> jess-users<br>
<b>Subject:</b> JESS: [EXTERNAL] Question on QueryResult close() function<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class=3D"MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">I am experiencing a memory leak problem in a Matlab-=
Jess application and I am trying to locate the leak. I came across the defi=
nition of the close() method of the QueryResult class. I have never called =
this method after using queries.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">1) Should I call close() after using a query?<o:p></=
o:p></p>
</div>
<div>
<p class=3D"MsoNormal">2) Could not calling close() be the cause of the lea=
k?&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">If not, I would appreciate any tips on typical cause=
s of leaks in Matlab-Jess applications.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Thanks in advance,<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><br>
Daniel<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>

--_000_7F2CAF6713AFDD4392FC4DAA05671E072C7EBD9BEXMB10srnsandia_--