Poco

class RefCountedObject

File Information

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: IoT::S7PLC::IS7PLCClient, IoT::Settings::SettingsServiceRemoteObject, Poco::OSP::WebEvent::WebEventServiceImpl::Subscriber, Poco::OSP::Service, Poco::RemotingNG::JSONRPC::JSValue, Poco::RemotingNG::JSONRPC::Listener, Poco::RemotingNG::SOAP::TransportFactory, Poco::RemotingNG::SOAP::Transport, Poco::RemotingNG::MethodHandler, Poco::RemotingNG::ProxyFactory, Poco::RemotingNG::RemoteObject, Poco::UPnP::SOAP::Listener, Poco::Util::AbstractConfiguration, Poco::WebTunnel::SocketDispatcher::SocketHandler, Poco::WebTunnel::SocketDispatcher::SocketInfo, Poco::RemotingNG::REST::CookieStore, Poco::RemotingNG::SOAP::Listener, Poco::RemotingNG::TCP::FrameHandler, Poco::RemotingNG::Context, Poco::RemotingNG::EventSubscriber, Poco::UPnP::GENA::Transport, Poco::UPnP::ServiceDesc::RangeRestriction, Poco::XSD::Types::AllIterator, Poco::XSD::Types::ElementTypeRef, Poco::XSD::Types::ListTypeRef, Poco::XSD::Types::OrderContent, Poco::XSD::Types::OrderIteratorImpl, Poco::XSD::Types::SequenceIterator, Poco::XSD::Types::SimpleRestrictionInlineType, Poco::Zip::ZipOperation, IoT::CANopen::FrameScheduler::FrameNotification, IoT::CANopen::NMT::HeartbeatTask, IoT::CANopen::NMT::AutoStartTask, IoT::MQTT::IMQTTClient, IoT::S7PLC::S7PLCClientRemoteObject, IoT::UDP::UDPEndpointEventDispatcher, IoT::XBee::XBeeNodeRemoteObject, IoT::DeviceStatus::DeviceStatusServiceEventDispatcher, IoT::DeviceStatus::IDeviceStatusService, IoT::Mailer::MailerServiceRemoteObject, IoT::MobileConnection::MobileConnectionServiceSkeleton, IoT::SMS::ShortMessageServiceRemoteObject, IoT::Settings::ISettingsService, Poco::RemotingNG::Authenticator, Poco::RemotingNG::Authorizer, Poco::RemotingNG::Listener, Poco::Util::WinRegistryConfiguration, Poco::XSD::Types::AttributeContent, Poco::XSD::Types::AnnotatedObject, Poco::XSD::Types::Binding, Poco::XSD::Types::CollectionContent, Poco::XSD::Types::List, Poco::Zip::Add, Poco::XSD::Types::Schema, IoT::XBee::IXBeeNode, Poco::RemotingNG::TCP::ClientAuthenticator, Poco::RemotingNG::TCP::SCRAMClientAuthenticator, Poco::RemotingNG::TCP::ServerTransport, Poco::RemotingNG::TCP::TimerTask, Poco::RemotingNG::TCP::Transport, Poco::RemotingNG::Transport, Poco::UPnP::SOAP::TransportFactory, Poco::Util::JSONConfiguration, Poco::Util::IntValidator, Poco::Util::MapConfiguration, Poco::Util::Subsystem, Poco::Util::TimerTaskAdapter, Poco::XSD::Types::Any, Poco::XSD::Types::All, Poco::XSD::Types::AnyIterator, Poco::XSD::Types::AttributeRef, Poco::XSD::Types::ChoiceIterator, Poco::XSD::Types::Order, Poco::XSD::Types::SimpleTypeInheritance, IoT::BtLE::PeripheralManagerSkeleton, IoT::Modbus::ModbusMasterImpl::SendNotification, IoT::Modbus::ModbusMasterImpl::SendNotificationImpl, IoT::Modbus::ModbusMasterImpl::StopNotification, IoT::Modbus::ModbusMasterImpl::ResetNotification, IoT::Modbus::IModbusMaster, IoT::UDP::UDPEndpointSkeleton, IoT::MobileConnection::MobileConnectionServiceEventDispatcher, IoT::WebEvent::IWebEventNotifier, Poco::RemotingNG::REST::Transport, Poco::RemotingNG::REST::TransportFactory, Poco::RemotingNG::SOAP::CookieStore, Poco::RemotingNG::TCP::CredentialsStore, Poco::RemotingNG::TCP::PlainClientAuthenticator, Poco::RemotingNG::ORB::RemoteObjectInfo, Poco::RemotingNG::Proxy, Poco::RemotingNG::Skeleton, Poco::RemotingNG::TransportFactory, Poco::UPnP::SOAP::Transport, Poco::UPnP::ServiceDesc::ListRestriction, Poco::UPnP::ServiceDesc::ServiceCollection::ServiceInfo, Poco::Util::Validator, Poco::XSD::Types::AbstractAttributeGroup, Poco::XSD::Types::ElementRef, Poco::XSD::Types::Group, Poco::XSD::Types::Operation, Poco::XSD::Types::Type, IoT::BtLE::PeripheralBrowserRemoteObject, IoT::CANopen::Object, IoT::CANopen::Node, IoT::CANopen::VarObject, IoT::CANopen::ArrayObject, IoT::CANopen::SDOParameterObject, IoT::MQTT::MQTTClientEventDispatcher, IoT::MQTT::MQTTClientRemoteObject, IoT::Modbus::ModbusMasterRemoteObject, IoT::OPC::OPCClientRemoteObject, Poco::Util::PropertyFileConfiguration, Poco::Util::RegExpValidator, Poco::Util::XMLConfiguration, Poco::XSD::Types::Attribute, Poco::XSD::Types::ComplexType, Poco::XSD::Types::Content, Poco::XSD::Types::Message, Poco::XSD::Types::PortType, Poco::XSD::Types::Sequence, Poco::XSD::Types::Union, IoT::BtLE::IPeripheral, IoT::BtLE::PeripheralEventDispatcher, IoT::OPC::IOPCClient, IoT::UDP::IUDPEndpoint, IoT::XBee::XBeeNodeSkeleton, IoT::Mailer::IMailerService, IoT::NetworkEnvironment::INetworkEnvironmentService, IoT::NetworkEnvironment::NetworkEnvironmentServiceEventDispatcher, IoT::NetworkEnvironment::NetworkEnvironmentServiceRemoteObject, IoT::SMS::IShortMessageService, Poco::XSD::Types::AbstractElementImpl, Poco::XSD::Types::Annotation, Poco::XSD::Types::AbstractGroup, Poco::XSD::Types::AttributeGroup, Poco::XSD::Types::AttributeGroupRef, Poco::XSD::Types::AttributeTypeRef, Poco::XSD::Types::InheritanceInfo, Poco::XSD::Types::Definitions, Poco::XSD::Types::Documentation, Poco::XSD::Types::Element, Poco::Zip::Delete, Poco::XSD::Types::SimpleType, Poco::Zip::Replace, Poco::Zip::Keep, IoT::BtLE::IPeripheralBrowser, IoT::BtLE::PeripheralBrowserEventDispatcher, IoT::BtLE::IPeripheralManager, IoT::BtLE::PeripheralRemoteObject, IoT::BtLE::PeripheralSkeleton, IoT::CAN::CANEndpointEventDispatcher, IoT::CAN::CANEndpointRemoteObject, IoT::OPC::BasicClient, IoT::S7PLC::S7PLCClientSkeleton, IoT::OPC::OPCClientSkeleton, IoT::XBee::XBeeNodeEventDispatcher, IoT::DeviceStatus::DeviceStatusServiceSkeleton, IoT::MobileConnection::IMobileConnectionService, IoT::Settings::SettingsServiceSkeleton, IoT::WebEvent::WebEventNotifierSkeleton, EventChannel, PatternFormatter, WindowsConsoleChannel, WindowsColorConsoleChannel, Poco::JS::Core::Module, Poco::Net::Impl::IPAddressImpl, Poco::Net::Impl::IPv4AddressImpl, Poco::Net::Impl::IPv6AddressImpl, Poco::Net::RemoteSyslogChannel, Poco::OSP::WebEvent::WebEventService, Poco::RemotingNG::HTTP::TransportFactory, Formatter, Notification, SimpleFileChannel, Poco::JS::Net::CancelHandler, Poco::Net::Impl::SocketAddressImpl, Poco::Net::Impl::IPv4SocketAddressImpl, Poco::Net::Impl::IPv6SocketAddressImpl, Poco::Net::Impl::LocalSocketAddressImpl, Poco::Net::SocketNotifier, Poco::Net::sizeof, Poco::OSP::Auth::TwoFactor::TwoFactorService, Poco::OSP::JS::JSExecutor, Poco::OSP::JS::TimedJSExecutor, Poco::OSP::JS::ModuleExtensionPoint, Poco::OSP::Mail::MailDeliveryHandle, Poco::OSP::Mail::MailDeliveryService, Poco::OSP::BundleProperties, Poco::OSP::BundleContext, Poco::OSP::Configuration, 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::HTTP::Listener, Poco::RemotingNG::JSONRPC::Transport, TaskNotification, TaskStartedNotification, TaskCancelledNotification, TaskFinishedNotification, TaskFailedNotification, TaskProgressNotification, TaskCustomNotification, Poco::JS::Core::JSExecutor, Poco::JS::Core::TimedJSExecutor, Poco::Net::ICMPSocketImpl, Poco::Net::RemoteSyslogListener, Poco::OSP::Auth::Data::AuthAdminServiceImpl, Poco::OSP::Auth::AuthAdminService, Poco::OSP::JS::ServiceListenerHolder, Poco::OSP::WebEvent::WebEventServiceImpl, NullChannel, SplitterChannel, Poco::JS::Bridge::BridgeHolder, Poco::Net::HTTPServerParams, Poco::Net::SocketImpl, Poco::Net::WebSocketImpl, Poco::OSP::Auth::AbstractLDAPAuthAdminService, Poco::OSP::Web::WebServerExtensionPoint, Poco::OSP::Web::WebSessionStore, Poco::OSP::BundleContextFactory, Poco::OSP::BundleFactory, Poco::OSP::BundleInstallerService, Poco::OSP::BundleFile, Poco::OSP::BundleStorage, Poco::OSP::Preferences, Poco::RemotingNG::JSONRPC::JSObject, Poco::RemotingNG::REST::JSArray, Poco::RemotingNG::REST::JSScalar, Poco::RemotingNG::REST::JSValue, Poco::RemotingNG::REST::Listener, StreamChannel, SyslogChannel, Task, Poco::Net::DatagramSocketImpl, 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::OSP::Auth::TwoFactor::TwoFactorServiceImpl, Poco::OSP::JS::JSExtensionPoint, Poco::OSP::Mail::MailDeliveryServiceImpl, Poco::OSP::Web::WebServerDispatcher, Poco::OSP::Auth::AuthService, Poco::OSP::BundleFilter, Poco::OSP::Bundle, Poco::OSP::OSPSubsystem, Poco::RemotingNG::HTTP::Transport, Poco::RemotingNG::JSONRPC::TransportFactory, Poco::RemotingNG::TCP::FrameQueue, Poco::RemotingNG::Identifiable, Poco::Util::Application, Poco::Util::LoggingSubsystem, Poco::Util::ServerApplication, Poco::XSD::Types::AnnotationContent, Poco::XSD::Types::ElementImpl, Poco::XSD::Types::Service, Poco::XSD::Types::ElementIterator, Poco::Zip::Rename, IoT::BtLE::PeripheralFactory, IoT::BtLE::PeripheralBrowserSkeleton, IoT::BtLE::PeripheralManagerRemoteObject, IoT::CAN::CANEndpointSkeleton, IoT::CAN::ICANEndpoint, IoT::DeviceStatus::DeviceStatusServiceRemoteObject, IoT::Mailer::MailerServiceSkeleton, IoT::SMS::ShortMessageServiceSkeleton, IoT::WebEvent::WebEventNotifierEventDispatcher, Poco::JS::Bridge::Listener, Poco::JS::Core::AsyncFunctionCompletedTask, Poco::JS::Core::AsyncFunctionFailedTask, Poco::Net::RawSocketImpl, Poco::Net::StreamSocketImpl, Poco::Net::TCPServerConnectionFilter, Poco::OSP::Web::MediaTypeMapper, Poco::OSP::Web::TokenValidator, Poco::OSP::Web::WebServerService, Poco::OSP::Web::WebSessionService, Poco::OSP::PreferencesService, Poco::OSP::ExtensionPointService, Poco::OSP::ServiceFactory, Poco::OSP::ServiceListener, Poco::RemotingNG::TCP::Connection, Poco::RemotingNG::TCP::Frame, Poco::RemotingNG::TCP::Listener, Poco::RemotingNG::TCP::Listener::EventSubscription, Poco::RemotingNG::TCP::SCRAMAuthenticator, Poco::RemotingNG::TCP::SocketFactory, Poco::RemotingNG::TCP::TransportFactory, Poco::RemotingNG::EventFilter, Poco::RemotingNG::EventListener, Poco::UPnP::GENA::Listener, Poco::UPnP::SSDP::Advertisement, Poco::UPnP::ServiceDesc::NoRestriction, Poco::UPnP::ServiceDesc::Action, Poco::UPnP::ServiceDesc::Restriction, Poco::UPnP::ServiceDesc::Service, Poco::UPnP::ServiceDesc::StateVariable, Poco::Util::ConfigurationMapper, Poco::Util::IniFileConfiguration, Poco::Net::TCPServerParams, Poco::OSP::BundleDirectory, Poco::OSP::BundleManifest, Poco::OSP::ExtensionPoint, Poco::RemotingNG::JSONRPC::CookieStore, Poco::RemotingNG::JSONRPC::JSArray, Poco::RemotingNG::JSONRPC::JSScalar, Poco::RemotingNG::REST::JSObject, Poco::RemotingNG::EventDispatcher, Poco::RemotingNG::EventDispatcher::SubscriberInfo, Poco::UPnP::GENA::TransportFactory, Poco::Util::ConfigurationView, Poco::Util::FilesystemConfiguration, Poco::Util::SystemConfiguration, Poco::Util::LayeredConfiguration, Poco::Util::TimerTask, Poco::Util::TimerFunc, Poco::WebTunnel::SocketFactory, Poco::WebTunnel::RemotePortForwarder::TunnelMultiplexer, Poco::WebTunnel::RemotePortForwarder::TunnelDemultiplexer, Poco::XSD::Types::AbstractAttribute, Poco::XSD::Types::AbstractList, Poco::XSD::Types::AnyAttribute, Poco::XSD::Types::AppInfo, Poco::XSD::Types::GroupRef, Poco::XSD::Types::Choice, Poco::XSD::Types::Notation, Poco::XSD::Types::SimpleRestriction, Poco::XSD::Types::Visitable, IoT::CANopen::NodeImpl, IoT::MQTT::MQTTClientSkeleton, IoT::Modbus::ModbusMasterEventDispatcher, IoT::Modbus::ModbusMasterSkeleton, IoT::UDP::UDPEndpointRemoteObject, IoT::MobileConnection::MobileConnectionServiceRemoteObject, IoT::NetworkEnvironment::NetworkEnvironmentServiceSkeleton, IoT::WebEvent::WebEventNotifierRemoteObject, IoT::Devices::CounterRemoteObject, IoT::Devices::CompositeRemoteObject, IoT::Devices::IFlagsDatapoint, IoT::Devices::EnumDatapointEventDispatcher, IoT::Devices::IDeviceTree, IoT::Devices::ILED, IoT::Devices::RotaryEncoderSkeleton, IoT::Devices::SensorRemoteObject, Poco::FastInfoset::Encoding, Poco::FastInfoset::IntEncoding, IoT::Devices::BarcodeReaderRemoteObject, IoT::Devices::BooleanDatapointRemoteObject, IoT::Devices::BooleanSensorRemoteObject, IoT::Devices::DatapointSkeleton, IoT::Devices::DeviceTreeSkeleton, IoT::Devices::DeviceTreeRemoteObject, IoT::Devices::FlagsDatapointRemoteObject, IoT::Devices::GNSSSensorSkeleton, IoT::Devices::GyroscopeEventDispatcher, IoT::Devices::ICounterDatapoint, IoT::Devices::IGyroscope, IoT::Devices::IOSkeleton, IoT::Devices::ISerialDevice, IoT::Devices::IRotaryEncoder, IoT::Devices::LEDEventDispatcher, IoT::Devices::LEDRemoteObject, IoT::Devices::LEDSkeleton, IoT::Devices::VectorDatapointRemoteObject, IoT::Devices::ScalarDatapointEventDispatcher, Poco::FastInfoset::UUIDEncoding, ActiveRunnableBase, ActiveRunnable, FileChannel, IoT::Devices::BarcodeReaderEventDispatcher, IoT::Devices::CameraEventDispatcher, IoT::Devices::CameraSkeleton, IoT::Devices::CounterDatapointEventDispatcher, IoT::Devices::CounterDatapointSkeleton, IoT::Devices::IBooleanDatapoint, IoT::Devices::IDatapoint, IoT::Devices::IORemoteObject, IoT::Devices::MagnetometerEventDispatcher, IoT::Devices::MagnetometerSkeleton, IoT::Devices::MagnetometerRemoteObject, IoT::Devices::RotaryEncoderRemoteObject, IoT::Devices::SerialDeviceRemoteObject, IoT::Devices::StringDatapointSkeleton, IoT::Devices::SwitchSkeleton, IoT::Devices::TriggerRemoteObject, Poco::Crypto::CipherImpl, Poco::Crypto::RSAKeyImpl, Poco::Data::AbstractSessionImpl, Poco::FastInfoset::HexEncoding, EventLogChannel, Logger, IoT::Devices::AccelerometerEventDispatcher, IoT::Devices::AccelerometerSkeleton, IoT::Devices::CompositeEventDispatcher, IoT::Devices::CompositeSkeleton, IoT::Devices::DeviceRemoteObject, IoT::Devices::ISwitch, IoT::Devices::ISensor, IoT::Devices::ScalarDatapointSkeleton, Poco::Crypto::KeyPairImpl, Poco::Data::RowFilter, Poco::Data::PooledSessionImpl, Poco::Data::SQLChannel, Poco::FastInfoset::CDataEncoding, Poco::FastInfoset::DoubleEncoding, Poco::FastInfoset::LongEncoding, ConsoleChannel, ColorConsoleChannel, IoT::Datapoints::DatapointFactorySkeleton, IoT::Devices::BooleanDatapointSkeleton, IoT::Devices::EnumDatapointRemoteObject, IoT::Devices::IIO, IoT::Devices::ScalarDatapointRemoteObject, IoT::Devices::IOEventDispatcher, IoT::Devices::SensorSkeleton, IoT::Devices::SerialDeviceSkeleton, IoT::Devices::StringDatapointEventDispatcher, IoT::Devices::TriggerEventDispatcher, IoT::Devices::TriggerSkeleton, IoT::Devices::VectorDatapointSkeleton, Poco::Crypto::Cipher, Poco::Crypto::RSACipherImpl, Poco::Data::SessionPool, Poco::JS::Core::ModuleRegistry, Poco::Net::SMTPChannel, Poco::OSP::Auth::PooledAuthAdminService, Poco::OSP::Web::WebFilterExtensionPoint, Poco::OSP::ServiceRef, IoT::Devices::BooleanDatapointEventDispatcher, IoT::Devices::CameraRemoteObject, IoT::Devices::CounterDatapointRemoteObject, IoT::Devices::CounterSkeleton, IoT::Devices::CounterEventDispatcher, IoT::Devices::DatapointEventDispatcher, IoT::Devices::DatapointRemoteObject, IoT::Devices::DeviceSkeleton, IoT::Devices::EnumDatapointSkeleton, IoT::Devices::FlagsDatapointEventDispatcher, IoT::Devices::GNSSSensorEventDispatcher, IoT::Devices::GNSSSensorRemoteObject, IoT::Devices::GyroscopeSkeleton, IoT::Devices::IBarcodeReader, IoT::Devices::IComposite, IoT::Devices::ICounter, IoT::Devices::IVectorDatapoint, IoT::Devices::SerialDeviceEventDispatcher, IoT::Devices::VectorDatapointEventDispatcher, Poco::ActiveRecord::ActiveRecordBase, Poco::ActiveRecord::ActiveRecord, Poco::ActiveRecord::KeylessActiveRecord, Poco::ActiveRecord::Context, Poco::Crypto::CipherKeyImpl, Poco::Data::SessionImpl, Poco::FastInfoset::NullEncoding, AsyncChannel, IoT::Devices::BarcodeReaderSkeleton, IoT::Devices::BooleanSensorEventDispatcher, IoT::Devices::BooleanSensorSkeleton, IoT::Devices::DeviceEventDispatcher, IoT::Devices::IGNSSSensor, IoT::Devices::IScalarDatapoint, IoT::Devices::IStringDatapoint, IoT::Devices::SensorEventDispatcher, IoT::Devices::SwitchEventDispatcher, IoT::Devices::SwitchRemoteObject, Poco::Data::PooledSessionHolder, Poco::FastInfoset::FloatEncoding, Poco::FastInfoset::NullRefEncoding, Poco::FastInfoset::ShortEncoding, Channel, IoT::Datapoints::DatapointFactoryRemoteObject, IoT::Datapoints::IDatapointFactory, IoT::Devices::AccelerometerRemoteObject, IoT::Devices::FlagsDatapointSkeleton, IoT::Devices::GyroscopeRemoteObject, IoT::Devices::IAccelerometer, IoT::Devices::IBooleanSensor, IoT::Devices::ICamera, IoT::Devices::IDevice, IoT::Devices::IEnumDatapoint, IoT::Devices::IMagnetometer, IoT::Devices::ITrigger, IoT::Devices::RotaryEncoderEventDispatcher, IoT::Devices::StringDatapointRemoteObject, Poco::Crypto::ECKeyImpl, Poco::FastInfoset::BoolEncoding, Poco::FastInfoset::DWordEncoding, ActiveResultHolder, FormattingChannel

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.

Securely control IoT edge devices from anywhere   Connect a Device