[vtkusers] passing pointers to VTK-classes

Jens G. jens-devel at gmx.de
Fri Jan 20 12:44:59 EST 2006


I had a look at vtkSetGet.h and it seems as if I do not have to worry.

Am Freitag, 20. Januar 2006 09:20 schrieb Jens G.:
> Hi
> Can I be sure that all functions of VTK-classes requesting a "const char*"
> or a "char*" are NOT saving the pointers adress but copying the string to
> there own memory?
> I wonder what happens if I pass a "const char*"/"char*" to any VTK-class
> and free that "const char*"/"char*" afterwards.
> How long do I have to make sure that a pointer I passed to a VTK-class
> stays valid?
>
> 	Greetings
> 		Jens
>
> P.S:
> I know that I do not have to worry about passing pointers of VTK-classes if
> I use "Delete()" instead of "delete".
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list