class Poco::RefCountedObject

Overview

A base class for objects that employ reference counting based garbage collection. More…

#include <RefCountedObject.h>

class RefCountedObject
{
public:
    // methods

    void
    duplicate() const;

    void
    release() const;

    int
    referenceCount() const;
};

// direct descendants

template <class ResultType>
class ActiveResultHolder;

template <>
class ActiveResultHolder<void>;

class ActiveRunnableBase;
class Channel;
class Formatter;
class IPAddressImpl;
class SocketAddressImpl;
class SocketImpl;
class SocketNotifier;
class TCPServerParams;
class Notification;
class PipeImpl;
class ProcessHandleImpl;
class SharedMemoryImpl;
class Task;
struct CallbackData;
class AbstractConfiguration;
class Subsystem;
class TimerTask;
class Validator;

Detailed Documentation

A base class for objects that employ reference counting based garbage collection.

Reference-counted objects inhibit construction by copying and assignment.

Construction

virtual
~RefCountedObject()

Destroys the RefCountedObject.

Methods

void
duplicate() const

Increments the object’s reference count.

void
release() const

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

int
referenceCount() const

Returns the reference count.