[vtk-developers] Change in DataArray to use operator new instead of malloc

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue Feb 7 16:19:38 EST 2006


On further inquistion, it was concluded that the change was unncessary
-- and will be discarded.

Thanks for your prompt responses.
Utkarsh.



Mathieu Malaterre wrote:
> Utkarsh Ayachit wrote:
> 
>> vtkDataArrayTemplate used malloc()/free()/realloc() to allocate/free
>> memory. That has now been changed to use the C++ operators new and
>> delete.
>>
>> This change will affect those who have been passing an array to the
>> class to manage using SetArray() or SetVoidArray() with the "save"
>> argument set to "0". Earlier, it was assumed that the array was
>> allocated using malloc(), now it is required that the array is allocated
>> using new[].
> 
> 
> This is bug: #2407
> 
> http://vtk.org/Bug/bug.php?op=show&bugid=2407&pos=0
> 
> This is a very recent change in VTK, and provided a faster way to
> reallocate memory...
> 
> Mathieu
> 




More information about the vtk-developers mailing list