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

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