Library: Foundation
Package: Core
Header: Poco/RefCountedObject.h
A base class for objects that employ reference counting based garbage collection.
Reference-counted objects inhibit construction by copying and assignment.
Known Derived Classes: Formatter, Poco::Net::RemoteSyslogChannel, Poco::Net::SocketNotifier, Poco::Util::MapConfiguration, Poco::Util::Validator, ActiveRunnableBase, ActiveRunnable, AsyncChannel, ConsoleChannel, ColorConsoleChannel, EventLogChannel, FileChannel, Logger, OpcomChannel, TaskStartedNotification, TaskCancelledNotification, TaskFinishedNotification, TaskNotification, SyslogChannel, TaskFailedNotification, TaskProgressNotification, TaskCustomNotification, FormattingChannel, NullChannel, StreamChannel, Poco::Util::IntValidator, Notification, PatternFormatter, SimpleFileChannel, ActiveResultHolder, Channel, Poco::Net::SocketImpl, Poco::Util::ConfigurationMapper, WindowsConsoleChannel, WindowsColorConsoleChannel, Poco::Net::WebSocketImpl, Poco::Util::LayeredConfiguration, SplitterChannel, Task, Poco::Net::RawSocketImpl, Poco::Net::ServerSocketImpl, Poco::Util::Application, Poco::Util::IniFileConfiguration, Poco::Util::RegExpValidator, Poco::Util::TimerTaskAdapter, Poco::Util::WinRegistryConfiguration, Poco::Net::DatagramSocketImpl, Poco::Net::ICMPSocketImpl, Poco::Net::SocketNotification, Poco::Net::ReadableNotification, Poco::Net::WritableNotification, Poco::Net::ErrorNotification, Poco::Net::TimeoutNotification, Poco::Net::IdleNotification, Poco::Net::ShutdownNotification, Poco::Net::StreamSocketImpl, Poco::Net::TCPServerParams, Poco::Util::LoggingSubsystem, Poco::Util::PropertyFileConfiguration, Poco::Util::ServerApplication, Poco::Util::Subsystem, Poco::Util::XMLConfiguration, Poco::Net::HTTPServerParams, Poco::Net::RemoteSyslogListener, Poco::Util::AbstractConfiguration, Poco::Util::ConfigurationView, Poco::Util::FilesystemConfiguration, Poco::Util::SystemConfiguration, Poco::Util::TimerTask
Member Functions: duplicate, referenceCount, release
Creates the RefCountedObject. The initial reference count is one.
virtual ~RefCountedObject();
Destroys the RefCountedObject.
void duplicate() const;
Increments the object's reference count.
int referenceCount() const;
Returns the reference count.
void release() const;
Decrements the object's reference count and deletes the object if the count reaches zero.