Page MenuHomePhabricator

PlanarFigure uses unmanged/uncontrolled pointer for PlaneGeometry
Closed, ResolvedPublic

Description

Opened this (sub) task to discuss if we should have such an unsave construct in the class. I would judge it as premature optimization. The savest way is to over a getter that always casts the BaseData::Geometry to plane geometry and skip the unmanaed member completly. Was there an known issue, explicit plan why the current pattern was chosen?

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

floca triaged this task as Unbreak Now! priority.May 24 2020, 8:18 PM
floca lowered the priority of this task from Unbreak Now! to Normal.
floca created this task.
floca updated the task description. (Show Details)
floca removed floca as the assignee of this task.May 25 2020, 1:34 PM

Discussion result: We deem it premature optimization and the unmanaged raw pointer should be removed. Get the geometry from base data and cast it where needed. If the cust does not work. Throw an exception, because it is an exceptional state.

floca added a revision: Restricted Differential Revision.Jul 8 2020, 1:07 PM