mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
Fixed initial reference counter value
This commit is contained in:
parent
d0285edcb7
commit
1896c09a2d
@ -54,7 +54,7 @@ namespace Noux {
|
||||
|
||||
public:
|
||||
|
||||
Reference_counter() : _value(1) { }
|
||||
Reference_counter() : _value(0) { }
|
||||
};
|
||||
|
||||
|
||||
@ -88,7 +88,10 @@ namespace Noux {
|
||||
void _dec_ref_count()
|
||||
{
|
||||
if (Shared_pointer_base::_dec_ref_count()) {
|
||||
PDBG("ref count for %p reached zero -> delete object", _ptr);
|
||||
|
||||
if (0)
|
||||
PINF("ref count for %p reached zero -> delete object", _ptr);
|
||||
|
||||
Genode::destroy(_alloc, _ptr);
|
||||
_ptr = 0;
|
||||
_alloc = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user