[reSIProcate] VS2005 crashing with DUM

Byron Campen bcampen at estacado.net
Wed Oct 24 09:39:46 CDT 2007


	I'm not willing to buy this without some hard evidence. I have never  
had a problem with auto_ptr and virtual d'tors, and a Google search  
turns up nothing. Additionally, I can't think of a plausible reason  
why this would be the case (auto_ptr<Foo> isn't going to be calling  
~Foo() directly).

Best regards,
Byron Campen


> auto_ptr is not compatible with virtual destructors. that may be  
> the odd bit.
> david
>
> On 10/23/07, Alan Hawrylyshen <alan at polyphase.ca> wrote:
>>
>>
>> On 23-Oct-07, at 04:30 , Nilay Tripathi wrote:
>> The auto_ptr instance that we create has everything fine, but as  
>> soon as we
>> assign it to mClientAuthManager, vfptr goes for a toss. Something  
>> creepy in
>> operator=() of auto_ptr.
>>
>> Is it safe to assume that the 'creepy' part of auto_ptr is  
>> something other
>> than the 'assignment transfers ownership' semantics of auto_ptr.
>>
>> Given a class, A, and a pair of auto_ptr's p1 and p2, the  
>> following is
>> roughly true:
>>  A* p;
>>  auto_ptr<A> p1(p = new A);
>>  // p1 'points' to the 'new A' (the same place that 'p' points)
>>  // of course 'p' is dangerous and merely here for pedagogical  
>> purposes.
>>  auto_ptr<A> p2(p1);
>>
>>  // p2 now 'points' at the same place as 'p' and
>>  // p1 is pointing at nothing.
>>
>>  auto_ptr<A> p3 = p2 ; // usually disallowed, but has same effect,  
>> only p3
>>  // refers to the same A that p does.
>>
>>  Using auto_ptr<>::release() and auto_ptr<>::get() can put you in  
>> trouble
>> too...
>>
>> Or was it something else really 'odd'?
>>
>>
>>
>>
>> Alan Hawrylyshen
>> a l a n a t p o l y p h a s e d o t c a
>>
>>
>> _______________________________________________
>> resiprocate-devel mailing list
>> resiprocate-devel at resiprocate.org
>> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2423 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20071024/34558ff7/attachment.bin>


More information about the resiprocate-devel mailing list