On 01/21/2011 08:55 AM, Amos Jeffries wrote:
> Hmmm, bug in Subscription then.

> - virtual AsyncCall::Pointer callback() const { return new Call_(call); }
> + virtual AsyncCall::Pointer callback() const { return new 
> Call_(call.getRaw()); }
> 
>  private:
>      const RefCount<Call_> call; ///< gets copied to create callback calls

Still does not look right. getRaw() returns a pointer to the call. You
do not want to copy a pointer. You want to copy the call itself:

virtual AsyncCall::Pointer callback() const { return new Call_(*call); }


And if Call_(call.getRaw()) actually compiles, there is another bug
somewhere, allowing a pointer-to-AsyncCall conversion to AsyncCall.

HTH,

Alex.

Reply via email to