Comment 9 for bug 521507

Revision history for this message
Johan Hake (johan-hake) wrote : Re: [Bug 521507] Re: Memory leak in Python Expression interface

On Sunday 14 February 2010 11:27:11 Garth Wells wrote:
> Looks like it is a SWIG bug, which can be worked around by removing the
> SWIG flag '-dirvtable', see the change

Ok, this actually make sense, as the -dirvtable creates a lookup table for
faster dynamic dispatches during runtime. This table is probably not deleted.
It is created the fist time a director method is called, and explains why the
code did not leak when the call to eval was out commented, as it was never
created. It also explains why the code did not leak when the expression were
created only once.

I can try to see if I can produce a minimal example that I can attach to a bug
report upstream to SWIG.

Johan

> http://bazaar.launchpad.net/~dolfin-core/dolfin/main/revision/4511
>
> ** Changed in: dolfin
> Importance: Undecided => High
>
> ** Changed in: dolfin
> Milestone: None => 0.9.7
>