[Insight-developers] Question about delete on VC++

Jisung Kim bahrahm@yahoo.com
Fri, 27 Sep 2002 07:15:46 -0700 (PDT)


Hi.

I have a question for memory deallocation in VC++.

Currently, my itkKdTreeBasedKmeansEstimatorTest is
leaking memory on VC++ machine. It seems like that the
some of the k-d tree nodes has not been deleted.
However, On linux, it didn't have any leak. I traced
the creation and deletion of nodes by print out the
address of each nodes. And the result shows perfect
match between creation and deletion.

Is there anything more than calling "delete" to delete
an object. I think I read an article from MS about
using delete and also assign zero to the pointer to
properly delete object in a long time ago. Is it the
case? Should I assign zero to the pointer after
calling delete?

Thank you,



=====
Jisung Kim
bahrahm@yahoo.com
106 Mason Farm Rd.
129 Radiology Research Lab., CB# 7515
Univ. of North Carolina at Chapel Hill
Chapel Hill, NC 27599-7515

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com