[C++-sig] Re: Doubts with wrapping/using abstract bases.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Aug 14 08:34:51 CEST 2003

>>>>> "RG" == Raoul Gough <RaoulGough at yahoo.co.uk> writes:

[snip explanation by RG of how test_holder.py works]

Thanks for the explanation, it confirmed my understanding!

    RG> BTW, have you considered using boost::shared_ptr? I wouldn't
    RG> trust std::auto_ptr with this kind of stuff. Also, storing raw
    RG> pointers in a vector is just asking for trouble if you ask me.

Dave enlightened me on the advantages of using boost::shared_ptr a
month or so back.  Unfortunately I am not in a position to change my
code at this time for two reasons: (a) I'll need to investigate if
there is a performance hit for my kind of code (b) I don't have the
time to change the interface in my code right now and carefully
eliminate cyclic reference loops etc.

Storing pointers in a vector is asking for trouble?  It might be true
in general but I'd say using pointers carefully is not bad.  It has
worked well for me so far.


More information about the Cplusplus-sig mailing list