[CppAD] copy of adfun object

Brad Bell bradbell at seanet.com
Wed Oct 21 10:19:09 EDT 2009


Thank you for the bug report. I did not realize that CppAD is using the 
default assignment and copy constructor for functions objects (and these 
will not work properly).

What is you motivation for making a copy of a function object (so that I 
can understand what it is you would like the copy to do and / or suggest 
an alternative construction) ?

Dominik Skanda wrote:
> Hi all
> Is there a Copy Constructor or a copy operator for the adfun object and
> how to use it properly?
> My Problem is, that i can copy an ADFUN object but cannot delete it anymore!
>
> CppAD::ADFun<double> *RHS=new CppAD::ADFun<double>(RHS_TO_COPY);
> delete RHS;
>
> delete RHS fails!!
>
> Many Thanks in advance
> Dominik
>
> _______________________________________________
> CppAD mailing list
> CppAD at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cppad
>
>   



More information about the CppAD mailing list