fix: fix a memory leak bug, in measure for text actor
This commit is contained in:
@@ -142,6 +142,10 @@ EllipseAnnotationActor::~EllipseAnnotationActor() {
|
||||
controlP_rt = nullptr;
|
||||
controlP_lb = nullptr;
|
||||
controlP_rb = nullptr;
|
||||
if (text) {
|
||||
text->Delete();
|
||||
text = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void EllipseAnnotationActor::SetRenderer(vtkRenderer *ren) {
|
||||
|
||||
@@ -140,6 +140,11 @@ OpenPolyAnnotationActor::~OpenPolyAnnotationActor() {
|
||||
p->Delete();
|
||||
});
|
||||
controlPointList.clear();
|
||||
if (text)
|
||||
{
|
||||
text->Delete();
|
||||
text=nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void OpenPolyAnnotationActor::selfDragCb(vtkObject *, unsigned long event, void *data) {
|
||||
|
||||
@@ -153,6 +153,10 @@ RoundAnnotationActor::~RoundAnnotationActor() {
|
||||
controlP_rt = nullptr;
|
||||
controlP_lb = nullptr;
|
||||
controlP_rb = nullptr;
|
||||
if (text) {
|
||||
text->Delete();
|
||||
text = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void RoundAnnotationActor::SetRenderer(vtkRenderer *ren) {
|
||||
|
||||
Reference in New Issue
Block a user