Library: Foundation
Package: Core
Header: Poco/RefCountedObject.h
Description
A base class for objects that employ reference counting based garbage collection.
Reference-counted objects inhibit construction by copying and assignment.
Inheritance
Known Derived Classes: Poco::Crypto::ECKeyImpl, Poco::Crypto::RSACipherImpl, Poco::Crypto::Cipher, Poco::Data::RowFilter, Poco::Crypto::CipherImpl, Poco::Crypto::CipherKeyImpl, Poco::Crypto::KeyPairImpl, Poco::Crypto::RSAKeyImpl, Poco::Data::AbstractSessionImpl, Poco::Data::PooledSessionHolder, Poco::Data::PooledSessionImpl, Poco::Data::SessionImpl, Channel, Poco::Data::SQLChannel, ActiveRunnableBase, ActiveRunnable, EventLogChannel, Poco::Data::SessionPool, ActiveResultHolder, AsyncChannel, ConsoleChannel, ColorConsoleChannel, EventChannel, FileChannel, FormattingChannel, Logger, Formatter, NullChannel, SimpleFileChannel, PatternFormatter, SyslogChannel, TaskNotification, TaskStartedNotification, TaskCancelledNotification, TaskFinishedNotification, TaskFailedNotification, TaskProgressNotification, TaskCustomNotification, Poco::Net::Impl::IPAddressImpl, Poco::Net::Impl::IPv4AddressImpl, Poco::Net::Impl::IPv6AddressImpl, Notification, StreamChannel, Task, SplitterChannel, WindowsColorConsoleChannel, WindowsConsoleChannel, Poco::Net::DatagramSocketImpl, Poco::Net::ICMPSocketImpl, Poco::Net::Impl::IPv4SocketAddressImpl, Poco::Net::Impl::SocketAddressImpl, Poco::Net::Impl::IPv6SocketAddressImpl, Poco::Net::Impl::LocalSocketAddressImpl, Poco::Net::SocketImpl, Poco::Net::HTTPServerParams, Poco::Net::RawSocketImpl, Poco::Net::RemoteSyslogListener, Poco::Net::ServerSocketImpl, Poco::Net::SMTPChannel, Poco::Net::SocketNotifier, Poco::Net::WebSocketImpl, Poco::Net::TCPServerConnectionFilter, Poco::Net::SecureServerSocketImpl, Poco::Net::Session, Poco::Util::IniFileConfiguration, Poco::Util::FilesystemConfiguration, Poco::Util::Subsystem, Poco::Util::SystemConfiguration, Poco::Util::XMLConfiguration, Poco::Net::RemoteSyslogChannel, Poco::Net::ReadableNotification, Poco::Net::WritableNotification, Poco::Net::SocketNotification, Poco::Net::IdleNotification, Poco::Net::ShutdownNotification, Poco::Net::ErrorNotification, Poco::Net::TimeoutNotification, Poco::Net::StreamSocketImpl, Poco::Net::TCPServerParams, Poco::Util::AbstractConfiguration, Poco::Util::ConfigurationMapper, Poco::Util::IntValidator, Poco::Util::LayeredConfiguration, Poco::Util::Validator, Poco::Util::WinRegistryConfiguration, Poco::Util::JSONConfiguration, Poco::Util::MapConfiguration, Poco::Util::RegExpValidator, Poco::Util::TimerTask, Poco::Util::TimerTaskAdapter, Poco::Zip::Add, Poco::Zip::Replace, Poco::Net::Context, Poco::Net::SecureStreamSocketImpl, Poco::Util::ConfigurationView, Poco::Util::Application, Poco::Util::LoggingSubsystem, Poco::Util::PropertyFileConfiguration, Poco::Util::ServerApplication, Poco::Zip::Rename, Poco::Zip::Delete, Poco::Zip::ZipOperation, Poco::Zip::Keep
Member Summary
Member Functions: duplicate, referenceCount, release
Constructors
RefCountedObject
Creates the RefCountedObject. The initial reference count is one.
Destructor
~RefCountedObject
virtual ~RefCountedObject();
Destroys the RefCountedObject.
Member Functions
duplicate
void duplicate() const;
Increments the object's reference count.
referenceCount
int referenceCount() const;
Returns the reference count.
release
void release() const;
Decrements the object's reference count and deletes the object if the count reaches zero.