Re: [Quickfix-users] Memory Leak - Please help.
Brought to you by:
orenmnero
From: James P M. I. <jmi...@bl...> - 2008-04-03 20:31:35
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> -"We don't know when you are done with the message"<br> <br> Isn't the whole point of a garbage collected runtime to deal with this problem?<br> <br> OK, I get that its good form to call Dispose, but why is this required?<br> <br> Doesn't Dispose get called when these objects are being garbage collected?<br> <br> <a class="moz-txt-link-abbreviated" href="mailto:or...@qu...">or...@qu...</a> wrote: <blockquote cite="mid:200...@em..." type="cite"> <pre wrap="">QuickFIX Documentation: <a class="moz-txt-link-freetext" href="http://www.quickfixengine.org/quickfix/doc/html/index.html">http://www.quickfixengine.org/quickfix/doc/html/index.html</a> QuickFIX Support: <a class="moz-txt-link-freetext" href="http://www.quickfixengine.org/services.html">http://www.quickfixengine.org/services.html</a> </pre> <br> <hr size="4" width="90%"><br> <div>We don't know when you are done with the message. You need to call Dispose when you are finished with it.</div> <div> </div> <div>--oren</div> <blockquote style="border-left: 2px solid blue; padding-left: 8px; margin-left: 8px;" webmail="1">-------- Original Message --------<br> Subject: [Quickfix-users] Memory Leak - Please help.<br> From: "Sam Smith" <a class="moz-txt-link-rfc2396E" href="mailto:sa...@if..."><sa...@if...></a><br> Date: Thu, March 20, 2008 6:37 am<br> To: <<a moz-do-not-send="true" href="mailto:qui...@li...urceforge">qui...@li...urceforge</a>.net><br> <br> QuickFIX Documentation: <a moz-do-not-send="true" href="http://www.quickfixengine.org/quickfix/doc/html/index.html" target="_blank">http://www.quickfixengine.org/quickfix/doc/html/index.html</a><br> QuickFIX Support: <a moz-do-not-send="true" href="http://www.quickfixengine.org/services.html" target="_blank">http://www.quickfixengine.org/services.html</a><br> <br> <hr> <o:SmartTagType name="City" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType name="place" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType> <style> #wmMessage st1\:* {behavior:url(#default#ieooui) } </style> <style> #wmMessage /* Style Definitions */ p.MsoNormal, #wmMessage li.MsoNormal, #wmMessage div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} #wmMessage a:link, #wmMessage span.MsoHyperlink {color:blue; text-decoration:underline;} #wmMessage a:visited, #wmMessage span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} #wmMessage span.EmailStyle17 {mso-style-type:personal-compose; font-family:Arial; color:windowtext;} #wmMessage @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} #wmMessage div.Section1 {page:Section1;} </style> <div class="Section1"> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hi,<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I am reasonably new to QuickFix and I have a problem. I have been asked to look at part of a C# application using the .Net QuickFixEngine library.<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">My problem is that the application seems to have substantial memory leak.<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Looking at the application using a .Net memory profiler, it looks like a lot of QuickFix objects are hanging around in memory. It looks like the .Net code is releasing all references to the objects, but some unmanaged code is retaining a reference.<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Am I missing something obvious? Should the developers who wrote it have been calling a .Dispose method or delete or something on these objects? One major source of the leak seems to come from messages that are created by the unmanaged C++ library and passed into our managed code. When our managed code finishes with them they do not seem to get cleaned up.<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Please help.<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><strong><b><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Sam Smith</span></font></b></strong><o:p></o:p></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Developer / Infrastructure</span></font><o:p></o:p></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Intelligent Financial Systems</span></font><o:p></o:p></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">110 <st1:place w:st="on">St Martin</st1:place>'s Lane<br> <st1:City w:st="on"><st1:place w:st="on">London</st1:place></st1:City><br> WC2N 4BA</span></font><o:p></o:p></div> <div><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> <o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Telephone 020 7379 7328</span></font><o:p></o:p></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Fax 020 7379 7329</span></font><o:p></o:p></div> <div><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><o:p> </o:p></span></font></div> </div> <hr> -------------------------------------------------------------------------<br> This <a moz-do-not-send="true" href="http://SF.net">SF.net</a> email is sponsored by: Microsoft<br> Defy all challenges. Microsoft(R) Visual Studio 2008.<br> <a moz-do-not-send="true" href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target="_blank">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a> <hr>_______________________________________________<br> Quickfix-users mailing list<br> <a moz-do-not-send="true" onclick="Popup.composeWindow('pcompose.php?sendto=Quickfix-users%40lists.sourceforge.net'); return false;" href="#Compose">Qui...@li...</a><br> <a moz-do-not-send="true" href="https://lists.sourceforge.net/lists/listinfo/quickfix-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/quickfix-users</a><br> </blockquote> <pre wrap=""> <hr size="4" width="90%"> ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. <a class="moz-txt-link-freetext" href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a></pre> <pre wrap=""> <hr size="4" width="90%"> _______________________________________________ Quickfix-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Qui...@li...">Qui...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/quickfix-users">https://lists.sourceforge.net/lists/listinfo/quickfix-users</a> </pre> </blockquote> <br> <pre class="moz-signature" cols="72"> </pre> </body> </html> |