|
From: Luigi B. <lui...@gm...> - 2012-02-07 13:38:41
|
Luca,
thanks for the report. Ferdinando applied your changes to the repository.
Luigi
On Sun, Feb 5, 2012 at 9:26 PM, Luca Billi <luc...@gm...> wrote:
> I noticed that the current implementation of LazyObjects generates
> infinite recursions
> in the case the dependency hierarchy among Observer/Observable objects
> contains loops.
>
> A suggestion to break the infinite recursion is to replace the update()
> method as follows:
>
> void LazyObject::update() {
>
> if (!frozen_&& calculated_){
> //
> // Set calculated_=false before calling notifyObservers()
> //
> calculated_ = false;
>
> notifyObservers();
> }
>
> calculated_ = false;
> }
>
>
> Luca
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> QuantLib-dev mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
|