Merge lp:~massing/dolfin/1.0.x-massing into lp:dolfin/1.0.x

Proposed by Andre Massing
Status: Merged
Approved by: Garth Wells
Approved revision: 6546
Merged at revision: 6546
Proposed branch: lp:~massing/dolfin/1.0.x-massing
Merge into: lp:dolfin/1.0.x
Diff against target: 34 lines (+10/-1)
1 file modified
dolfin/intersection/IntersectionOperatorImplementation.h (+10/-1)
To merge this branch: bzr merge lp:~massing/dolfin/1.0.x-massing
Reviewer Review Type Date Requested Status
Garth Wells Pending
Review via email: mp+128788@code.launchpad.net

Description of the change

Fixes memory leak in IntersectionOperator (#923028)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'dolfin/intersection/IntersectionOperatorImplementation.h'
--- dolfin/intersection/IntersectionOperatorImplementation.h 2011-11-15 03:00:12 +0000
+++ dolfin/intersection/IntersectionOperatorImplementation.h 2012-10-09 18:50:37 +0000
@@ -18,7 +18,7 @@
18// Modified by Johannes Ring, 2009.18// Modified by Johannes Ring, 2009.
19//19//
20// First added: 2009-09-1120// First added: 2009-09-11
21// Last changed: 2011-11-1121// Last changed: 2012-10-09
2222
23#ifndef __INTERSECTIONOPERATORIMPLEMENTATION_H23#ifndef __INTERSECTIONOPERATORIMPLEMENTATION_H
24#define __INTERSECTIONOPERATORIMPLEMENTATION_H24#define __INTERSECTIONOPERATORIMPLEMENTATION_H
@@ -55,6 +55,9 @@
55 // Only default constructor, since the search tree has a dimension dependent type, hence encapsulates in the55 // Only default constructor, since the search tree has a dimension dependent type, hence encapsulates in the
56 // inheriting IntersectionOperatorImplementation_d!56 // inheriting IntersectionOperatorImplementation_d!
5757
58 // Virtual destructor
59 virtual ~IntersectionOperatorImplementation() {}
60
58 virtual void all_intersected_entities(const Point & point, std::set<uint> & ids_result) const = 0;61 virtual void all_intersected_entities(const Point & point, std::set<uint> & ids_result) const = 0;
59 virtual void all_intersected_entities(const std::vector<Point> & points, std::set<uint> & ids_result) const = 0;62 virtual void all_intersected_entities(const std::vector<Point> & points, std::set<uint> & ids_result) const = 0;
6063
@@ -98,6 +101,12 @@
98 build_tree(labels, label);101 build_tree(labels, label);
99 }102 }
100103
104 /// Destructor which ensures to reset AABB tree
105 virtual ~IntersectionOperatorImplementation_d()
106 {
107 tree.reset();
108 }
109
101 virtual void all_intersected_entities(const Point& point, std::set<uint>& ids_result) const;110 virtual void all_intersected_entities(const Point& point, std::set<uint>& ids_result) const;
102 virtual void all_intersected_entities(const std::vector<Point>& points, std::set<uint>& ids_result) const;111 virtual void all_intersected_entities(const std::vector<Point>& points, std::set<uint>& ids_result) const;
103112

Subscribers

People subscribed via source and target branches