Re: class Instrument, virtual destructor
Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/class-Instrument-virtual-destructor-tp6569p6570.html
On Sep 3, 2008, at 7:46 PM, Kim Kuen Tang wrote:
> the class Instrument is defined as an abstract class. For that reason
> it should be provided with a virtual destructor
>
> virtual ~Instrument(){};
>
> to avoid memory leak. I hope that someone can add this to the file.
Kim,
the Instrument class inherits from LazyObject, which defines a
virtual destructor. Therefore, there's no need to declare one in
Instrument.
Luigi
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users