<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi all,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I’m trying to locate a memory
leak in our application. When I use the following code:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> <font color="#010001"><span
style='color:#010001'>MeshSourceType</span></font>::<font color="#010001"><span
style='color:#010001'>Pointer</span></font> <font color="#010001"><span
style='color:#010001'>meshSource</span></font> = <font color="#010001"><span
style='color:#010001'>MeshSourceType</span></font>::<font color="#010001"><span
style='color:#010001'>New</span></font>();<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> <font color="#010001"><span
style='color:#010001'>meshSource</span></font>-><font color="#010001"><span
style='color:#010001'>SetInput</span></font>( <font color="#010001"><span
style='color:#010001'>pBinImg</span></font> );<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> <font color="#010001"><span
style='color:#010001'>meshSource</span></font>-><font color="#010001"><span
style='color:#010001'>SetObjectValue</span></font>( 1 );<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> <font color="#010001"><span
style='color:#010001'>meshSource</span></font>-><font color="#010001"><span
style='color:#010001'>Update</span></font>();<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> <font color="#010001"><span
style='color:#010001'>MeshType</span></font>::<font color="#010001"><span
style='color:#010001'>Pointer</span></font> <font color="#010001"><span
style='color:#010001'>mesh</span></font>= <font color="#010001"><span
style='color:#010001'>meshSource</span></font>-><font color="#010001"><span
style='color:#010001'>GetOutput</span></font>();<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> <font color=blue><span
style='color:blue'>return</span></font> <font color="#010001"><span
style='color:#010001'>mesh</span></font>;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I get a memory leak at the meshSource->Update() method. The
error is:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=1
face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>{1506387}
normal block at 0x0555CFF8, 0 bytes long.<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=1 face="Courier New"><span
style='font-size:8.0pt;font-family:"Courier New"'> Data: <> €û_<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>If I don’t do the meshSource->Update(), then there
are no leaks. Since I create the Meshsource, update it and then return it
immediately, do I really need to do the Update(). Is there something that I’m
missing? I have the latest build of the ITK and the issue still happens.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Doug<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>----------------------------------------------------------------------<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Doug Hoppes <a href="mailto:dhoppes@mbfbioscience.com">dhoppes@mbfbioscience.com</a><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Senior Software Engineer<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>MBF Bioscience (Microbrightfield, Inc.)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>+1.802.288.9290 ext: 119<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>www.mbfbioscience.com</span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>