Andre Poenitz <[EMAIL PROTECTED]> writes:
| Ah... do I smell a possiblity to get
I have been sniffing on that idea myself... so far I think it has a
bad our odor.
| InsetBase * InsetFoo::clone()
>
| back?
>
| [aka:
>
| std::auto_prt<InsetBase> InsetFoo::clone()
| {
| return std::auto_prt<InsetBase>(new InsetFoo(this));
| }
>
| ->
>
| InsetBase * InsetFoo::clone()
| {
| return std::auto_prt<InsetBase>(new InsetFoo(this)).get();
| }
this code won't work... you'll get a dangling pointer. and if you use
relese() instead you get an unhandled bald pointer.
Exactly what I want to avoid.
--
Lgb