[Insight-developers] Question about delete on VC++
Jisung Kim
bahrahm@yahoo.com
Fri, 27 Sep 2002 09:48:05 -0700 (PDT)
Yes, the tree was created by the
itkWeightedCenteroidKdTreeGenerator and the deletion
logic is inside of the itkKdTree.
Is it a problem?
Thanks,
--- "Miller, James V (Research)" <millerjv@crd.ge.com>
wrote:
> Another thought. Is the data allocated in one
> thread and destroyed
> in another thread?
>
>
>
> > -----Original Message-----
> > From: Miller, James V (Research)
> > Sent: Friday, September 27, 2002 12:07 PM
> > To: 'Jisung Kim'; insight-dev-list
> > Subject: RE: [Insight-developers] Question about
> delete on VC++
> >
> >
> > Strange. If we were building Dlls, I would say
> that maybe we were
> > allocating nodes in one DLL and deallocating them
> in another DLL.
> > (I think each DLL has its own heap management).
> But since we are
> > not building DLLs, then that is not the problem.
> >
> > Have you run with VC the version that prints out
> all the node
> > allocation and deletions?
> >
> > Is there anything "inside" a node that is not
> being deleted?
> > Perhaps a
> > subitem is missing a destructor that needs to do
> something
> > that another
> > compiler is providing by default.
> >
> >
> >
> >
> > Friday, September 27, 2002 10:16 AM
> > > To: insight-dev-list
> > > Subject: [Insight-developers] Question about
> delete on VC++
> > >
> > >
> > > 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
> > > _______________________________________________
> > > Insight-developers mailing list
> > > Insight-developers@public.kitware.com
> > >
>
http://public.kitware.com/mailman/listinfo/insight-developers
> > >
> > _______________________________________________
> > Insight-developers mailing list
> > Insight-developers@public.kitware.com
> >
>
http://public.kitware.com/mailman/listinfo/insight-developers
> >
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
>
http://public.kitware.com/mailman/listinfo/insight-developers
=====
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