The docs say that:
Assigns a CRefArray object to this one.
So what I think is happening is that the copy constructor is doing exactly what it is supposed to do and returns the new CRefArray object which still points to a1, 'assigns' is the operative word here. To keep them separate I would rather do:
which gives me correctly: # VERBOSE : cRefArrayTest_Execute called ![]() On 4/30/2012 7:13 PM, Nicolas Burtnyk wrote: Yeah, exactly as I unfortunately discovered :( |
- CRefArray doesn't respect C++ copy semantics Nicolas Burtnyk
- Re: CRefArray doesn't respect C++ copy semantics jo benayoun
- Re: CRefArray doesn't respect C++ copy semantics Alok Gandhi
- Re: CRefArray doesn't respect C++ copy semanti... Nicolas Burtnyk
- Re: CRefArray doesn't respect C++ copy sem... Alok Gandhi
- Re: CRefArray doesn't respect C++ copy... piotrek marczak
- Re: CRefArray doesn't respect C++... Alok Gandhi
- Re: CRefArray doesn't respect... Nicolas Burtnyk
- Re: CRefArray doesn't respect C++... jo benayoun
- Re: CRefArray doesn't respect... Nicolas Burtnyk
- Re: CRefArray doesn't respect... Alok Gandhi
- Re: CRefArray doesn't res... Nicolas Burtnyk
- RE: CRefArray doesn't res... Marc-Andre Belzile
- Re: CRefArray doesn't res... piotrek marczak
- Re: CRefArray doesn't res... jo benayoun