Is it really memory leakage? The memory will be freed when the array
goes out of scope.
--
Anders
On Mon, Apr 16, 2012 at 08:02:57AM -0000, Johan Hake wrote:
> Public bug reported:
>
> When returning the coordinates from a Mesh in the Python interface a
> reference to the Mesh is stored kept in the NumPy array, keeping the
> Mesh in scope as long as the coordinate array lives. This might lead to
> memory leakage as the Mesh contains much larger memory structures than
> the coordinate vector.
>
> In discussion of:
>
> https://bugs.launchpad.net/dolfin/+bug/966553
>
> a solution was scetched, where the coordinates are stored as a
> shared_ptr<std::vector<double> >. Then we implement a shared_ptr version
> of Mesh::coordinates and store this object to the NumPy array instead.
>
> ** Affects: dolfin
> Importance: Undecided
> Assignee: Johan Hake (johan-hake)
> Status: New
>
> ** Changed in: dolfin
> Milestone: None => trunk
>
> ** Changed in: dolfin
> Assignee: (unassigned) => Johan Hake (johan-hake)
>
Is it really memory leakage? The memory will be freed when the array
goes out of scope.
--
Anders
On Mon, Apr 16, 2012 at 08:02:57AM -0000, Johan Hake wrote: /bugs.launchpad .net/dolfin/ +bug/966553 ptr<std: :vector< double> >. Then we implement a shared_ptr version
> Public bug reported:
>
> When returning the coordinates from a Mesh in the Python interface a
> reference to the Mesh is stored kept in the NumPy array, keeping the
> Mesh in scope as long as the coordinate array lives. This might lead to
> memory leakage as the Mesh contains much larger memory structures than
> the coordinate vector.
>
> In discussion of:
>
> https:/
>
> a solution was scetched, where the coordinates are stored as a
> shared_
> of Mesh::coordinates and store this object to the NumPy array instead.
>
> ** Affects: dolfin
> Importance: Undecided
> Assignee: Johan Hake (johan-hake)
> Status: New
>
> ** Changed in: dolfin
> Milestone: None => trunk
>
> ** Changed in: dolfin
> Assignee: (unassigned) => Johan Hake (johan-hake)
>