<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ks_c_5601-1987">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="time"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Batang;
        panose-1:2 3 6 0 0 1 1 1 1 1;}
@font-face
        {font-family:Gulim;
        panose-1:2 11 6 0 0 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Gulim;
        panose-1:2 11 6 0 0 1 1 1 1 1;}
@font-face
        {font-family:Batang;
        panose-1:2 3 6 0 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Gulim;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:99.25pt 3.0cm 3.0cm 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=KO link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=굴림><span
lang=EN-US style='font-size:10.0pt;font-family:Gulim;color:navy'>Hello<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=굴림><span
lang=EN-US style='font-size:10.0pt;font-family:Gulim;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=굴림><span
lang=EN-US style='font-size:10.0pt;font-family:Gulim;color:navy'>You have to
delay load vtk dlls too. (such as vtkcommon, vtkrendering, etc)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=굴림><span
lang=EN-US style='font-size:10.0pt;font-family:Gulim;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=굴림><span
lang=EN-US style='font-size:10.0pt;font-family:Gulim;color:navy'>regards<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=굴림><span
lang=EN-US style='font-size:10.0pt;font-family:Gulim;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
vtkusers-bounces+bosscq=nexgeo.com@vtk.org
[mailto:vtkusers-bounces+bosscq=nexgeo.com@vtk.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>echinococcus Multilocularis<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, October 30, 2006 <st1:time
o:ls="trans" Hour="6" Minute="37" w:st="on">6:37 AM</st1:time><br>
<b><span style='font-weight:bold'>To:</span></b> David Cole<br>
<b><span style='font-weight:bold'>Cc:</span></b> vtkusers@vtk.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [vtkusers] Memory
leaks....</span></font><span lang=EN-US><o:p></o:p></span></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>Thank you for your response. I did what you suggested,
to be precise, the second option. I added the linker option
/DELAYLOAD:vtkMFC.dll. (I use vtkRendering.dll as well, should this one be
delayed as well?) However, the result was now that there was an unresolved
symbol:<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>vtkMFC.lib(vtkMFC.dll) : error LNK2001: unresolved
external symbol <a href="mailto:___delayLoadHelper@8">___delayLoadHelper@8</a><br>
Debug/VTKStart.exe : fatal error LNK1120: 1 unresolved externals<br>
Error executing link.exe.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>After a little googling, i noticed i should add the
lib: Delayimp.lib. So i added the lib, and the compilation went fine again.
However, now, the memory leaks returned. Is there something else wrong, or am i
forgetting something?<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>Secondly, if i were to go the other path, which files
do I have to download? Only the files that are in the GUISupport/MFC/ or others
as well?<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>Thank you again for your response.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>Sincerely,<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>Han<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>----- Original
Message ----<br>
From: David Cole <david.cole@kitware.com><br>
To: echinococcus Multilocularis <lintworm2@yahoo.co.uk><br>
Cc: vtkusers@vtk.org<br>
Sent: Sunday, 29 October, 2006 <st1:time o:ls="trans" Hour="17" Minute="56"
w:st="on">5:56:43 PM</st1:time><br>
Subject: Re: [vtkusers] Memory leaks....<br>
<br>
The problem is that VTK dlls are loaded before the MFC dll, and at shutdown
time, the MFC dll is unloaded before the VTK dlls... And when the MFC dll
unloads, it does a memory leak check and incorrectly reports that all the VTK
objects still left are leaks. <br>
<br>
You can overcome this by updating VTK to the CVS version and rebuilding VTK
with VTK_USE_GUISUPPORT and VTK_USE_MFC turned on. I recently added flags
to the CMakeLists to eliminate these false memory leak reports. <br>
<br>
Alternatively, you can use the /DELAYLOAD linker flag to force the VTK dlls to
be loaded after the MFC dll and then they will also be unloaded prior to the
MFC dll. Then any leak reports that you see will be for real... (This is what I
added in CVS VTK to fix the problem.) <br>
<br>
HTH,<br>
David<br>
<br>
<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
lang=EN-US style='font-size:12.0pt'>On 10/29/06, <b><span style='font-weight:
bold'>echinococcus Multilocularis</span></b> <<a
href="mailto:lintworm2@yahoo.co.uk" target="_blank">lintworm2@yahoo.co.uk</a>>
wrote:</span></font></span><span lang=EN-US> <o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>Hello all,<br>
<br>
I finally got my M$ VC project working, using vtkMFCWindow. In this program i
read some geometrical data from disk using my own readerfunction. I then
display it using vtkMFCWindow. That all works fine, until i close the program
and clean up the memory. At the end of program i get a message that memory
leaks are detected. The problem is, that i really have no clue where they are
from. When i look at the data dumped by VC, i find references to all kinds of
objects i never have used. Can anybody tell me what i am doing wrong, or give
me any other clues? I have build my program mostly using the examples given for
vtkMFCWindow, however, also these examples give me the same problems. <br>
<br>
Thanking in advance,<br>
<br>
Han<br>
<br>
Send instant messages to your online friends <a
href="http://uk.messenger.yahoo.com/" target="_blank">http://uk.messenger.yahoo.com</a>
<o:p></o:p></span></font></p>
</div>
</div>
</div>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'><br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a
href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br>
<br>
<o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
</div>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'><br>
Send instant messages to your online friends http://uk.messenger.yahoo.com <o:p></o:p></span></font></p>
</div>
</body>
</html>