[vtkusers] Unhandled exception at the time of Unregistering vtkSmartPointer

cel02000 cel02000 at yahoo.com
Tue Jun 12 01:20:44 EDT 2012


Perfectly understandable.

I finally found the source of the problem in my code. I have about 40
functions which have at least one VTK class in their argument. In one of the
functions, I do dynamic memory allocation and use *malloc()* and *free()*
functions. This function has one argument as *vtkDoubleArray **. When I
comment out this function, my code ends successfully and can successfully
delete several created *vtkDoubleArray *pointers. But when this function is
active, the program fails in deleting *vtkDoubleArray*s. I checked the
function to deallocate all the allocated arrays correctly. I don't know why
this gives me the following error when mycode reaches its end.

/Windows has triggered a breakpoint in mycode.exe.
This may be due to a corruption of the heap, which indicates a bug in
mycode.exe or any of the DLLs it has loaded./

Thanks,
Ahmad

--
View this message in context: http://vtk.1045678.n5.nabble.com/Unhandled-exception-at-the-time-of-Unregistering-vtkSmartPointer-tp5713691p5713773.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list