Just an idea: couldn't a vtkVoidArray be used (or abused) as container of raw pointers, that would be appropriately downcasted internally to the concrete type to which they are supposed to point? For instance, instead of having a<br>
vtkMyInternalObject** obj<br>instance variable, couldn't I use a<br> vtkVoidArray* obj <br>instead, where each entry in obj would be the raw pointer to a vtkSmartPointer<vtkMyInternalObject>?<br><br>Thanks<br>Philippe<br>
<br><div class="gmail_quote">On Tue, Nov 20, 2012 at 5:14 PM, Philippe Pébay <span dir="ltr"><<a href="mailto:philippe.pebay@kitware.com" target="_blank">philippe.pebay@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Kyle<br><br>Yes, I would want to avoid a dependency on Boost. But this is basically what I am tried to reproduce (the Boost shared array of pointers).<br><br>Thanks<span class="HOEnZb"><font color="#888888"><br>P</font></span><div class="HOEnZb">
<div class="h5"><br><br><div class="gmail_quote">On Tue, Nov 20, 2012 at 5:13 PM, Kyle Lutz <span dir="ltr"><<a href="mailto:kyle.lutz@kitware.com" target="_blank">kyle.lutz@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Would using boost suffice? Or do you want a solution using just VTK?<br>
<br>
-kyle<br>
<div><div><br>
On Tue, Nov 20, 2012 at 7:58 AM, Philippe Pébay<br>
<<a href="mailto:philippe.pebay@kitware.com" target="_blank">philippe.pebay@kitware.com</a>> wrote:<br>
> Hello all,<br>
><br>
> I need to keep track of shared ownership of an array of pointers. Can<br>
> someone point me towards an example of code that already does this? This<br>
> should amount to a small helper class that contains the array of pointers<br>
> along with a reference count.<br>
><br>
> Thank you!<br>
> Philippe<br>
><br>
><br>
> --<br>
> Philippe Pébay, PhD<br>
> Director of Visualization and High Performance Computing /<br>
> Directeur de la Visualisation et du Calcul Haute Performance<br>
> Kitware SAS<br>
> 26 rue Louis Guérin, 69100 Villeurbanne, France<br>
> <a href="tel:%2B33%20%280%29%206.83.61.55.70" value="+33683615570" target="_blank">+33 (0) 6.83.61.55.70</a> / 4.37.45.04.15<br>
> <a href="http://www.kitware.fr" target="_blank">http://www.kitware.fr</a><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
><br>
><br>
</blockquote></div><br><br clear="all"><br>-- <br><font color="#888888">Philippe Pébay, PhD<br></font><font color="#888888">Director of Visualization and High Performance Computing /<br>
</font><font color="#888888">Directeur de la Visualisation et du Calcul Haute Performance<br>
Kitware SAS<br>26 rue Louis Guérin, 69100 Villeurbanne, France</font><br>
<font color="#888888"><a value="+33426685003">+33 (0) 6.83.61.55.70 / 4.37.45.04.15</a></font><font color="#888888"><br><a href="http://www.kitware.fr/" target="_blank">http://www.kitware.fr</a></font><font color="#888888"><a href="http://www.kitware.fr/" target="_blank"></a></font><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><font color="#888888">Philippe Pébay, PhD<br></font><font color="#888888">Director of Visualization and High Performance Computing /<br>
</font><font color="#888888">Directeur de la Visualisation et du Calcul Haute Performance<br>
Kitware SAS<br>26 rue Louis Guérin, 69100 Villeurbanne, France</font><br>
<font color="#888888"><a value="+33426685003">+33 (0) 6.83.61.55.70 / 4.37.45.04.15</a></font><font color="#888888"><br><a href="http://www.kitware.fr/" target="_blank">http://www.kitware.fr</a></font><font color="#888888"><a href="http://www.kitware.fr/" target="_blank"></a></font><br>