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

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