Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Re-QuantLib-svn-SF-net-SVN-quantlib-11869-trunk-QuantLib-tp9624.html
On Wed, 2007-07-11 at 09:28 -0700,
[hidden email] wrote:
> Revision: 11869
>
http://quantlib.svn.sourceforge.net/quantlib/?rev=11869&view=rev> Author: fdv1
> Date: 2007-07-11 09:28:06 -0700 (Wed, 11 Jul 2007)
>
> Log Message:
> -----------
> CashFlows::npv signature changed to avoid useless dynamic memory
> allocation.
> As a general rule I think that it might be a good practice to
> dereference pointers or Handles as early as possible so we can use
> plain reference later on. This would save indirections and remove the
> need to store objects systematically in the heap.
Well, most objects will have to be on the heap anyway since that's the
only way to store them as data members and keep polymorphic behavior.
But you're right, we can use references when we pass them as function
arguments. However, we'll have to find a less clumsy syntax than
*handle.currentLink(). Let me look into it...
Later,
Luigi
--
Every solution breeds new problems.
-- unknown
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev