Posted by
Luigi Ballabio on
May 24, 2010; 8:19am
URL: http://quantlib.414.s1.nabble.com/quantlib-Handle-compile-error-tp7722p7734.html
On Mon, 2010-05-24 at 15:30 +0800, P Nelnik wrote:
> Thanks Luigi and Simons (I & II) for your responses.
>
> A couple of suggestion:
> 1: perhaps we should change the code in
> Examples/EquityOption/EquityOption.cpp:
>
> Handle<YieldTermStructure> flatTermStructure(
> boost::shared_ptr<YieldTermStructure>(
> new FlatForward(settlementDate, riskFreeRate,
> dayCounter)));
> since it may leak memory and it sets a bad example.
Where can it leak memory?
> 2: When a developer tries to implement Handle<T> where T doesn't
> derive from Observable,
> he's told there is an error in:
> inline void Handle<T>::Link::linkTo(const
> boost::shared_ptr<T>& h, bool registerAsObserver) {
> A one line comment in that could warning developers that T must
> derive from Observable
It's already in the documentation for Handle (the docs before the class
definition.)
Luigi
--
Zawinski's Law:
Every program attempts to expand until it can read mail. Those
programs which cannot so expand are replaced by ones which can.
------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users