bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ cplusplus-bug 582115 ] In file pointer.h,constructor init count


From: Federico Montesino Pouzols
Subject: Re: [ cplusplus-bug 582115 ] In file pointer.h,constructor init count
Date: Tue, 13 Aug 2002 22:39:15 +0200 (CEST)

   Hi, I also think this is a bug. I would expect Pointer<>
to behave like it does when ptrCounter is initialized to 1.

   However, there are many interpretations of this kind of
classes. Could you confirm if this is a bug, David?


-----------------------------------------------------------
 Package commoncpp2-0.99.6.tar.gz

In file pointer.h, the constructor doesn't init ptrcount :

explicit Pointer(T* ptr = NULL) : ptrObject(ptr)
{
ptrCount = new unsigned;
}


I think it should be :

explicit Pointer(T* ptr = NULL) : ptrObject(ptr)
{
ptrCount = new unsigned;
*ptrCount = 1;
}






reply via email to

[Prev in Thread] Current Thread [Next in Thread]