18 #include <QStringList>
20 #include "exception.hpp"
94 static QString ConsumerIdToString(
const int id);
95 static QMutex WideLock;
96 static unsigned long LastCID;
101 QStringList Consumers;
102 QList<int> iConsumers;
107 #endif // COLLECTABLE_H
bool IsManaged()
IsManaged Managed class is deleted by GC and must not be deleted by hand.
virtual bool SafeDelete()
Use this if you are not sure if you can delete this object in this moment.
Base for all items that are supposed to be collected by garbage collector.
void UnregisterConsumer(const int consumer)
This function will remove a string which prevent the object from being removed.
void RegisterConsumer(const int consumer)
Registers a consumer.
QString DebugHgc()
DebugHgc.
void Unlock()
Unlock this object for deletion by other threads.
unsigned long CollectableID()
CollectableID.
bool Managed
Internal variable that contains a cache whether object is managed.
void Lock()
Lock this object so that other threads can't change consumers or modify its properties.