[Insight-users] trouble with SceneSpatialObject::RemoveSpatialObject

Julien Jomier jjomier at cs.unc.edu
Tue Jun 29 09:31:35 EDT 2004


Hi Kexiang,

This was a bug. The reference count of the object was decreased manually and
shouldn't be.
I just put a fix in the CVS repository please do a cvs update and it should
work.

Let us know if you have any further problems,
thanks for the report,

Julien

> -----Original Message-----
> From: insight-users-bounces at itk.org 
> [mailto:insight-users-bounces at itk.org] On Behalf Of Kexiang Wang
> Sent: Tuesday, June 29, 2004 1:21 AM
> To: insight-users at itk.org
> Subject: [Insight-users] trouble with 
> SceneSpatialObject::RemoveSpatialObject
> 
> 
> #include "itkSpatialObject.h"
> #include "itkSpatialObjectPoint.h"
> #include "itkSceneSpatialObject.h"
> 
> 
> void foo()
> {
> 	itk::SceneSpatialObject<2>::Pointer scene = 
> itk::SceneSpatialObject<2>::New();
> 	itk::SpatialObject<2>::Pointer object = 
> itk::SpatialObject<2>::New();
> 	scene->AddSpatialObject(object);
> 
> 	scene->RemoveSpatialObject(object);
> 
> }
> 
> void main()
> {
> 	foo();
> }
> 
> A access violvation occurs when foo() returns.  I guess something
> wrong with 'object' but don't know to fix it. please help.
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 



More information about the Insight-users mailing list