<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta content="text/html; charset=utf-8">
</head>
<body>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12.0pt; line-height:1.3; color:#1F497D">
<div>The main advantage of the ability to return smart pointers would be that ownership of VTK objects could be transferred safely to the caller, without requiring calling UnRegister(None). C++ developers are aware of pointers but for Python users it is a mistery
why sometimes they need to call UnRegister to avoid memory leaks. <br>
</div>
<div><br>
</div>
<div id="signature-x" class="signature_editor" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12.0pt; color:#1F497D">
Andras<br>
</div>
</div>
<div id="quoted_header" style="clear:both">
<hr style="border:none; height:1px; color:#E1E1E1; background-color:#E1E1E1">
<div style="border:none; padding:3.0pt 0cm 0cm 0cm"><span style="font-size:11.0pt; font-family:'Calibri','sans-serif'"><b>From:</b> David Gobbi <david.gobbi@gmail.com><br>
<b>Sent:</b> Thursday, May 17, 2018 4:55 PM<br>
<b>To:</b> Kyle Sunderland<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] Questions About Python Wrapping<br>
</span></div>
</div>
<br type="attribution">
<div>
<div dir="ltr">Hi Kyle,
<div><br>
</div>
<div>Thanks for sending the files. I see that the parameters for those methods are actually smart pointers, and as you have already noted, smart pointers aren't wrapped.</div>
<div><br>
</div>
<div>This has never been an issue in VTK proper or for most VTK projects, since VTK methods generally use raw pointers. The header file you sent is closer to ITK style than to VTK style.</div>
<div><br>
</div>
<div>I definitely think that it would be worthwhile to add better smart pointer handling to the wrappers.</div>
<div><br>
</div>
<div> - David</div>
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, May 17, 2018 at 12:13 PM, David Gobbi <span dir="ltr">
<<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr"><span class="">On Thu, May 17, 2018 at 10:10 AM, Kyle Sunderland <<a href="mailto:1krs1@queensu.ca" target="_blank">1krs1@queensu.ca</a>> wrote:<br>
> It (mostly) works, however I noticed that no functions are wrapped which have a definition that contains any of the wrapped classes. Does anyone have insight into what I might have missed?<br>
<br>
</span>Is a vtk..Hierarchy.txt file generated for the wrapped module when you build it? If so, send it to me along with the header files you're wrapping, and I can take a look.<span class=""><br>
<br>
> Also, as an additional question, is it still not possible to wrap functions that return a smart pointer?<br>
<br>
</span>
<div>If this is a feature that you need, then add it to the bug tracker.</div>
<div><br>
</div>
<div>Cheers,</div>
<div> - David</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>