[TD] avoid memory leaks by using shared_ptr
TD geometry objects are sometimes double deleted. This change uses shared_ptr instead of raw pointers to manage deletions.
This commit is contained in:
committed by
WandererFan
parent
ad2169e5ae
commit
28c5890bc9
@@ -126,17 +126,17 @@ public:
|
||||
std::vector<TechDraw::DrawViewBalloon*> getBalloons() const;
|
||||
|
||||
const std::vector<TechDraw::VertexPtr> getVertexGeometry() const;
|
||||
const std::vector<TechDraw::BaseGeom*> getEdgeGeometry() const;
|
||||
const std::vector<TechDraw::BaseGeom*> getVisibleFaceEdges() const;
|
||||
const BaseGeomPtrVector getEdgeGeometry() const;
|
||||
const BaseGeomPtrVector getVisibleFaceEdges() const;
|
||||
const std::vector<TechDraw::FacePtr> getFaceGeometry() const;
|
||||
|
||||
bool hasGeometry(void) const;
|
||||
TechDraw::GeometryObject* getGeometryObject(void) const { return geometryObject; }
|
||||
|
||||
TechDraw::BaseGeom* getGeomByIndex(int idx) const; //get existing geom for edge idx in projection
|
||||
TechDraw::BaseGeomPtr getGeomByIndex(int idx) const; //get existing geom for edge idx in projection
|
||||
TechDraw::VertexPtr getProjVertexByIndex(int idx) const; //get existing geom for vertex idx in projection
|
||||
TechDraw::VertexPtr getProjVertexByCosTag(std::string cosTag);
|
||||
std::vector<TechDraw::BaseGeom*> getFaceEdgesByIndex(int idx) const; //get edges for face idx in projection
|
||||
std::vector<TechDraw::BaseGeomPtr> getFaceEdgesByIndex(int idx) const; //get edges for face idx in projection
|
||||
|
||||
virtual Base::BoundBox3d getBoundingBox() const;
|
||||
double getBoxX(void) const;
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
|
||||
virtual Base::Vector3d projectPoint(const Base::Vector3d& pt,
|
||||
bool invert = true) const;
|
||||
virtual BaseGeom* projectEdge(const TopoDS_Edge& e) const;
|
||||
virtual BaseGeomPtr projectEdge(const TopoDS_Edge& e) const;
|
||||
|
||||
virtual gp_Ax2 getViewAxis(const Base::Vector3d& pt,
|
||||
const Base::Vector3d& direction,
|
||||
|
||||
Reference in New Issue
Block a user