|
Boost Users : |
Subject: Re: [Boost-users] [signals2] tracking intrusively ref-counted object
From: Igor R (boost.lists_at_[hidden])
Date: 2009-09-06 10:00:43
>> struct object
>> {
>> Â void init()
>> Â {
>> Â Â selfAncor_ = some_intrusive_ptr<object>(this);
>> Â Â connection1_ = signal1_.connect(&handle, ref(selfAncor_));
>> Â Â connection2_ = signal2_.connect(&handle, ref(selfAncor_));
>
> No, you want to bind a copy of the smart pointer to the slot by value.
> Making the slot accept it by reference just avoids creating another temporary copy during invocation
Excuse my ignorance, how can I make "the slot accept it by reference"
if I bind "a copy of the smart pointer to the slot by value"?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net