[Insight-users] array of smart pointers

Kevin H. Hobbs hobbsk at ohiou.edu
Thu Oct 15 13:54:32 EDT 2009


My (unfinished and attached) program is segfaulting at line 192 where I
create a new image smart pointer and assign it to an element of an array
of smart pointers.

	recv_images[ split ] = FloatImageType::New();

I got the array of smart pointers from malloc with :

	FloatImageType::Pointer * recv_images = 
	    (FloatImageType::Pointer *) malloc( 
	      mpi_size * sizeof( FloatImageType::Pointer ));

I know this isn't very C++ish but shouldn't it work?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MPIFastMarching.cxx
Type: text/x-c++src
Size: 9137 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091015/377fe460/attachment.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091015/377fe460/attachment.pgp>


More information about the Insight-users mailing list