mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 22:47:50 +00:00
parent
f68be31fa3
commit
d1e0e460a1
@ -26,12 +26,16 @@ void Object_identity::invalidate()
|
||||
{
|
||||
for (Object_identity_reference * oir = first(); oir; oir = first())
|
||||
oir->invalidate();
|
||||
_object.remove(this);
|
||||
|
||||
if (_object) {
|
||||
_object->remove(this);
|
||||
_object = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Object_identity::Object_identity(Object & object)
|
||||
: _object(object) { _object.insert(this); }
|
||||
: _object(&object) { _object->insert(this); }
|
||||
|
||||
|
||||
Object_identity::~Object_identity() { invalidate(); }
|
||||
|
@ -83,7 +83,7 @@ class Kernel::Object_identity
|
||||
{
|
||||
private:
|
||||
|
||||
Object & _object;
|
||||
Object * _object = nullptr;
|
||||
|
||||
public:
|
||||
|
||||
@ -91,7 +91,7 @@ class Kernel::Object_identity
|
||||
~Object_identity();
|
||||
|
||||
template <typename KOBJECT>
|
||||
KOBJECT * object() { return dynamic_cast<KOBJECT*>(&_object); }
|
||||
KOBJECT * object() { return dynamic_cast<KOBJECT*>(_object); }
|
||||
|
||||
void invalidate();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user