Poco

class RefCountedObject

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::RemotingNG::ProxyFactory, Poco::Util::Application, Poco::Util::PropertyFileConfiguration, Poco::Util::TimerTask, Poco::Util::TimerFunc, Poco::XSD::Types::AbstractAttributeGroup, Poco::XSD::Types::AnyAttribute, Poco::XSD::Types::AnyIterator, Poco::XSD::Types::AttributeGroup, Poco::XSD::Types::CollectionContent, Poco::XSD::Types::Content, Poco::XSD::Types::Documentation, Poco::XSD::Types::ElementRef, Poco::XSD::Types::ElementTypeRef, Poco::XSD::Types::List, Poco::XSD::Types::Message, Poco::XSD::Types::SimpleRestriction, Poco::Zip::Keep, Poco::XSD::Types::SimpleType, Poco::Util::ConfigurationView, Poco::Util::JSONConfiguration, Poco::Util::WinRegistryConfiguration, Poco::Util::XMLConfiguration, Poco::XSD::Types::AbstractAttribute, Poco::XSD::Types::Any, Poco::XSD::Types::Definitions, Poco::XSD::Types::Sequence, Poco::XSD::Types::Service, Poco::XSD::Types::Visitable, Poco::Zip::Rename, Poco::Zip::Delete, Poco::Net::ICMPSocketImpl, Poco::Net::Impl::SocketAddressImpl, Poco::Net::Impl::IPv4SocketAddressImpl, Poco::Net::Impl::IPv6SocketAddressImpl, Poco::Net::Impl::LocalSocketAddressImpl, Poco::Net::StreamSocketImpl, Poco::OSP::Auth::AuthAdminService, Poco::OSP::Mail::MailDeliveryServiceImpl, Poco::OSP::Web::MediaTypeMapper, Poco::OSP::ExtensionPoint, Poco::OSP::OSPSubsystem, Poco::OSP::Service, Poco::OSP::ServiceFactory, Poco::RemotingNG::JSONRPC::Listener, Poco::RemotingNG::REST::Listener, Poco::RemotingNG::SOAP::CookieStore, Poco::RemotingNG::SOAP::TransportFactory, Poco::RemotingNG::TCP::SocketFactory, Poco::RemotingNG::TCP::Transport, Poco::RemotingNG::Proxy, Poco::RemotingNG::TransportFactory, Poco::Util::FilesystemConfiguration, Poco::Util::IniFileConfiguration, Poco::Util::LayeredConfiguration, Poco::Util::LoggingSubsystem, Poco::Util::ServerApplication, Poco::XSD::Types::AllIterator, Poco::XSD::Types::AbstractGroup, Poco::XSD::Types::AppInfo, Poco::XSD::Types::AttributeGroupRef, Poco::XSD::Types::AttributeRef, Poco::XSD::Types::Choice, Poco::XSD::Types::Element, Poco::XSD::Types::ElementImpl, Poco::XSD::Types::Group, Poco::XSD::Types::GroupRef, Poco::XSD::Types::InheritanceInfo, Poco::XSD::Types::ListTypeRef, Poco::XSD::Types::Union, Poco::Net::RawSocketImpl, Poco::Net::SMTPChannel, Poco::Net::ServerSocketImpl, Poco::Net::SocketNotification, Poco::Net::ReadableNotification, Poco::Net::WritableNotification, Poco::Net::ErrorNotification, Poco::Net::TimeoutNotification, Poco::Net::IdleNotification, Poco::Net::ShutdownNotification, Poco::Net::WebSocketImpl, Poco::Net::SecureStreamSocketImpl, Poco::OSP::Web::TokenValidator, Poco::OSP::ExtensionPointService, Poco::OSP::PreferencesService, Poco::OSP::ServiceListener, Poco::RemotingNG::HTTP::Listener, Poco::RemotingNG::HTTP::TransportFactory, Poco::RemotingNG::REST::JSObject, Poco::RemotingNG::SOAP::Listener, Poco::RemotingNG::TCP::TimerTask, Poco::RemotingNG::EventFilter, Poco::RemotingNG::Transport, Poco::Util::ConfigurationMapper, Poco::Util::Subsystem, Poco::XSD::Types::AbstractElementImpl, Poco::XSD::Types::Annotation, Poco::XSD::Types::AbstractList, Poco::XSD::Types::All, Poco::XSD::Types::Binding, Poco::XSD::Types::OrderContent, Poco::XSD::Types::SimpleRestrictionInlineType, Poco::XSD::Types::Type, Poco::OSP::Web::WebServerDispatcher, Poco::OSP::Web::WebFilterExtensionPoint, Poco::OSP::Web::WebServerExtensionPoint, Poco::OSP::Web::WebServerService, Poco::OSP::Web::WebSessionStore, Poco::OSP::WebEvent::WebEventService, Poco::OSP::WebEvent::WebEventServiceImpl, Poco::OSP::WebEvent::WebEventServiceImpl::Subscriber, Poco::OSP::BundleContextFactory, Poco::OSP::Bundle, Poco::OSP::BundleFilter, Poco::RemotingNG::JSONRPC::JSObject, Poco::RemotingNG::JSONRPC::JSScalar, Poco::RemotingNG::Authenticator, Poco::RemotingNG::MethodHandler, Poco::RemotingNG::Identifiable, Poco::Util::IntValidator, Poco::Util::MapConfiguration, Poco::Util::RegExpValidator, Poco::XSD::Types::ComplexType, Poco::XSD::Types::AnnotatedObject, Poco::XSD::Types::Attribute, Poco::XSD::Types::SequenceIterator, Poco::XSD::Types::SimpleTypeInheritance, Poco::Zip::Add, Poco::Zip::ZipOperation, FormattingChannel, SimpleFileChannel, StreamChannel, SyslogChannel, WindowsConsoleChannel, WindowsColorConsoleChannel, Poco::ActiveRecord::Context, Poco::Crypto::ECKeyImpl, EventChannel, Poco::OSP::BundleContext, Poco::RemotingNG::SOAP::Transport, Poco::RemotingNG::TCP::ServerTransport, Poco::Util::TimerTaskAdapter, Poco::Util::Validator, Poco::XSD::Types::AnnotationContent, Poco::XSD::Types::AttributeTypeRef, Poco::XSD::Types::Operation, Poco::XSD::Types::PortType, Poco::Crypto::RSAKeyImpl, ActiveRunnableBase, ActiveRunnable, FileChannel, Logger, Poco::Crypto::CipherKeyImpl, AsyncChannel, ConsoleChannel, ColorConsoleChannel, Formatter, NullChannel, Task, SplitterChannel, Poco::Net::DatagramSocketImpl, Poco::Crypto::CipherImpl, Poco::Crypto::RSACipherImpl, Poco::Data::AbstractSessionImpl, Poco::Data::SQLChannel, Channel, Poco::ActiveRecord::KeylessActiveRecord, Poco::Crypto::Cipher, Poco::Data::PooledSessionImpl, Poco::Data::RowFilter, Notification, PatternFormatter, TaskNotification, TaskStartedNotification, TaskCancelledNotification, TaskFinishedNotification, TaskFailedNotification, TaskProgressNotification, TaskCustomNotification, Poco::Net::sizeof, Poco::Net::Context, Poco::Net::SecureServerSocketImpl, Poco::OSP::Mail::MailDeliveryHandle, Poco::OSP::Mail::MailDeliveryService, Poco::OSP::Auth::AuthService, Poco::OSP::BundleDirectory, Poco::OSP::BundleStorage, Poco::OSP::BundleFactory, Poco::OSP::Preferences, Poco::OSP::ServiceRef, Poco::RemotingNG::REST::CookieStore, Poco::RemotingNG::REST::JSScalar, Poco::RemotingNG::TCP::FrameQueue, Poco::RemotingNG::TCP::SCRAMAuthenticator, Poco::ActiveRecord::ActiveRecordBase, Poco::ActiveRecord::ActiveRecord, Poco::Data::SessionPool, ActiveResultHolder, Poco::Net::HTTPServerParams, Poco::Net::RemoteSyslogListener, Poco::Net::SocketImpl, Poco::Net::Session, Poco::OSP::BundleInstallerService, Poco::OSP::QLExpr, Poco::OSP::QLAndExpr, Poco::OSP::QLOrExpr, Poco::OSP::QLNotExpr, Poco::OSP::QLExistsExpr, Poco::OSP::QLRelExpr, Poco::OSP::QLEqExpr, Poco::OSP::QLNeExpr, Poco::OSP::QLLtExpr, Poco::OSP::QLLeExpr, Poco::OSP::QLGtExpr, Poco::OSP::QLGeExpr, Poco::OSP::QLMatchExpr, Poco::OSP::QLMatchRegExpr, Poco::OSP::QLTrueExpr, Poco::RemotingNG::JSONRPC::JSValue, Poco::RemotingNG::HTTP::Transport, Poco::RemotingNG::TCP::FrameHandler, Poco::RemotingNG::TCP::Listener, Poco::RemotingNG::TCP::Listener::EventSubscription, Poco::RemotingNG::TCP::SCRAMClientAuthenticator, Poco::RemotingNG::TCP::TransportFactory, Poco::RemotingNG::EventDispatcher, Poco::RemotingNG::EventDispatcher::SubscriberInfo, Poco::RemotingNG::EventSubscriber, Poco::RemotingNG::Listener, Poco::XSD::Types::Order, Poco::XSD::Types::Schema, Poco::Zip::Replace, Poco::Data::PooledSessionHolder, EventLogChannel, Poco::Net::Impl::IPAddressImpl, Poco::Net::Impl::IPv4AddressImpl, Poco::Net::Impl::IPv6AddressImpl, Poco::OSP::BundleFile, Poco::RemotingNG::REST::JSValue, Poco::RemotingNG::REST::Transport, Poco::RemotingNG::REST::TransportFactory, Poco::RemotingNG::TCP::Connection, Poco::RemotingNG::TCP::CredentialsStore, Poco::RemotingNG::Authorizer, Poco::RemotingNG::Context, Poco::RemotingNG::EventListener, Poco::Util::SystemConfiguration, Poco::XSD::Types::AttributeContent, Poco::XSD::Types::ChoiceIterator, Poco::XSD::Types::ElementIterator, Poco::XSD::Types::Notation, Poco::XSD::Types::OrderIteratorImpl, Poco::Crypto::KeyPairImpl, Poco::Data::SessionImpl, Poco::Net::SocketNotifier, Poco::Net::RemoteSyslogChannel, Poco::Net::TCPServerConnectionFilter, Poco::Net::TCPServerParams, Poco::OSP::Auth::AbstractLDAPAuthAdminService, Poco::OSP::Web::WebSessionService, Poco::OSP::Configuration, Poco::OSP::BundleManifest, Poco::OSP::BundleProperties, Poco::RemotingNG::JSONRPC::CookieStore, Poco::RemotingNG::JSONRPC::JSArray, Poco::RemotingNG::JSONRPC::Transport, Poco::RemotingNG::JSONRPC::TransportFactory, Poco::RemotingNG::REST::JSArray, Poco::RemotingNG::TCP::ClientAuthenticator, Poco::RemotingNG::TCP::Frame, Poco::RemotingNG::TCP::PlainClientAuthenticator, Poco::RemotingNG::ORB::RemoteObjectInfo, Poco::RemotingNG::RemoteObject, Poco::Util::AbstractConfiguration, Poco::RemotingNG::Skeleton

Member Summary

Member Functions: duplicate, referenceCount, release

Constructors

RefCountedObject

RefCountedObject();

Creates the RefCountedObject. The initial reference count is one.

Destructor

~RefCountedObject protected virtual

virtual ~RefCountedObject();

Destroys the RefCountedObject.

Member Functions

duplicate inline

void duplicate() const;

Increments the object's reference count.

referenceCount inline

int referenceCount() const;

Returns the reference count.

release inline

void release() const noexcept;

Decrements the object's reference count and deletes the object if the count reaches zero.