MantisBT - VTK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013224 | VTK | (No Category) | public | 2012-06-06 20:43 | 2013-10-22 15:30 |
Reporter | dennisHu | ||||
Assigned To | Dan Lipsa | ||||
Priority | low | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | won't fix | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Project | TBD | ||||
Type | incorrect functionality | ||||
Summary | 0013224: vtkInteractorObserver destructor calls virtual function SetEnabled | ||||
Description | virtual function SetEnabled is called in the destructor of vtkInteractorObserver. From debug, it just calls empty function in vtkInteractorObserver. As we know, from http://www.artima.com/cppsource/nevercall.html [^] Never call virtual functions during construction or destruction. It's better to remove this call. I guess SetEnabled(0) will be called in sub-class destructor. | ||||
Steps To Reproduce | |||||
Additional Information | Indeed, it is not the best style to call virtual functions in constructors/destructors as this might suggest that you want derived behavior to be invoked. The C++ standard does specify that the function that is called in this case is the function defined in the current class (the function does not depend on the object the function is called through). It is as if the functions called do not have the virtual keyword. There are four virtual functions called in the destructor: SetEnabled, SetCurrentRenderer, SetDefaultRenderer and SetInteractor, some are non-empty. Removing calls to the virtual functions in the destructor might require researching/changing vtkInteractorObserver and tens of derived classes. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-06-06 20:43 | dennisHu | New Issue | |||
2013-10-21 13:40 | Dan Lipsa | Assigned To | => Dan Lipsa | ||
2013-10-21 13:40 | Dan Lipsa | Status | backlog => tabled | ||
2013-10-21 14:18 | Dave DeMarle | Status | tabled => backlog | ||
2013-10-22 13:28 | Dan Lipsa | Status | backlog => closed | ||
2013-10-22 13:28 | Dan Lipsa | Resolution | open => won't fix | ||
2013-10-22 13:28 | Dan Lipsa | Additional Information Updated | bug_revision_view_page.php?rev_id=659#r659 | ||
2013-10-22 15:25 | Dan Lipsa | Status | closed => backlog | ||
2013-10-22 15:25 | Dan Lipsa | Resolution | won't fix => reopened | ||
2013-10-22 15:30 | Dan Lipsa | Status | backlog => closed | ||
2013-10-22 15:30 | Dan Lipsa | Resolution | reopened => won't fix | ||
2013-10-22 15:30 | Dan Lipsa | Additional Information Updated | bug_revision_view_page.php?rev_id=660#r660 |
There are no notes attached to this issue. |