最近、log4cplus-1.1.2 のソースコードを読んだところ、SharedLoggerImplPtr
. Loger::value
< spi::LoggerImpl *
/p>
Loger::value
行 284-285 の logger.hの定義:
/** This is a pointer to the implementation class. */
spi::LoggerImpl * value;
行 105-110、149-153 での logger.cxx の ctor と dtor の実装:
Logger::Logger (spi::LoggerImpl * ptr)
: value (ptr)
{
if (value)
value->addReference ();
}
Logger::~Logger ()
{
if (value)
value->removeReference ();
}
本当?