This should get the DEBUG=1 build further than the net.
* We need to start with a zero reference count, and we also don't want to be deleted by that mechanism. * Note, I could not test the changes yet.
This commit is contained in:
parent
c61ed599d4
commit
c946981296
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Copyright 2008-2013, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -21,16 +21,18 @@
|
||||
|
||||
class NetNotificationService : public DefaultUserNotificationService {
|
||||
public:
|
||||
NetNotificationService();
|
||||
virtual ~NetNotificationService();
|
||||
NetNotificationService();
|
||||
virtual ~NetNotificationService();
|
||||
|
||||
void Notify(const KMessage& event);
|
||||
void Notify(const KMessage& event);
|
||||
|
||||
protected:
|
||||
virtual void FirstAdded();
|
||||
virtual void LastRemoved();
|
||||
virtual void LastReferenceReleased();
|
||||
virtual void FirstAdded();
|
||||
virtual void LastRemoved();
|
||||
};
|
||||
|
||||
|
||||
static NetNotificationService sNotificationService;
|
||||
|
||||
|
||||
@ -38,8 +40,11 @@ static NetNotificationService sNotificationService;
|
||||
|
||||
|
||||
NetNotificationService::NetNotificationService()
|
||||
: DefaultUserNotificationService("network")
|
||||
:
|
||||
DefaultUserNotificationService("network")
|
||||
{
|
||||
// We need to set the reference count to zero for DEBUG builds
|
||||
fReferenceCount = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -61,6 +66,13 @@ NetNotificationService::Notify(const KMessage& event)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
NetNotificationService::LastReferenceReleased()
|
||||
{
|
||||
// don't delete us here
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
NetNotificationService::FirstAdded()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user