ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #00265
Changed storage of constants from reference to copy in forms. This is [...]
Commit from johanjan (2005-09-11 13:16 CEST)
--------------------
Changed storage of constants from reference to copy in forms. This is
to avoid this type of subtle memory error:
class LinearForm
{
public:
Linearform(real& c0) : c0(c0)
{
}
real& c0;
}
class MySolver
{
public:
MySolver(real c) : L(c)
{
// !!! After this constructor returns, the contents of LinearForm::c0 are
// no longer allocated.
}
LinearForm L;
}
ffc src/ffc/format/dolfin.py 1.34
Follow ups