[Insight-developers] thread safety of c++ new operator

Luis Ibanez luis.ibanez at kitware.com
Sun Apr 1 11:01:23 EDT 2007


Hi Tri,

What is the object that your are constructing when you
call the "new" operator ?

It is unlikely that the threading problem is in the
"new" operator itself. It is more likely that the problem
is in the constructor of object that is being created
by the call to the "new" operator.

Please let us know more details,


    Thanks


      Luis


----------------
Tri Ngo wrote:
> Hi,
> I have a multithreaded filter that is crashing because two threads are
> simultaneously calling the new operator.  Since the new operator is
> used throughout itk classes, especially in the constructor, I was
> wondering what is a good method of handling this problem.  Otherwise
> it will be difficult to allocate any non-primitive variables in
> threads.
> 
> Thanks,
> Tri
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> 


More information about the Insight-developers mailing list