AW: AW: [vtkusers] Error message when the application is ended
jiang
jiang at TI.Uni-Trier.DE
Wed Feb 25 11:18:33 EST 2004
Hi, David,
Thank you for your hint. I look through my code. There is no such registered
object in my code.
It is really strange. Could you tell me if there are some other cases that
will cause my problem?
Why is VTK so strict for its objects?
Thanks again!
Chunyan Jiang
-----Ursprüngliche Nachricht-----
Von: david michell [mailto:davidmichell at rediffmail.com]
Gesendet: Mittwoch, 25. Februar 2004 16:15
An: jiang
Betreff: Re: AW: [vtkusers] Error message when the application is ended
assume you have something like this
case 1)
vtkRenderer *rn=vtkRenderer::New();
vtkRenderer *temp;
temp=rn;/// when you do something like this then you have to register
rn->Register(this);//this increases ref count of rn by 1
//later when you no longer need temp you do
temp->Delete();// now ref count of rn is reduced by one
case2)
the other way is to not register and not delete
vtkRenderer *rn=vtkRenderer::New();
vtkRenderer *temp;
temp=rn;
//forget about Register() and Delete(),but this is not a good way
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040225/7fc228b7/attachment.htm>
More information about the vtkusers
mailing list