This commit is contained in:
Chris Jones 2010-01-13 21:08:35 -06:00
Родитель 723563b8f5
Коммит 90128359d2
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -15,7 +15,7 @@ parent:
// tests check shutdown semantics
PTestShutdownSub(bool expectCrash);
// Used to synchronize between parent and child, to avoid racies
// Used to synchronize between parent and child, to avoid races
// around flushing socket write queues
sync Sync();

Просмотреть файл

@ -45,12 +45,16 @@ class TestShutdownSubParent :
public PTestShutdownSubParent
{
public:
TestShutdownSubParent(bool expectCrash) : mExpectCrash(expectCrash)
TestShutdownSubParent(bool expectCrash) :
mExpectCrash(expectCrash),
mDeletedCount(0)
{
}
virtual ~TestShutdownSubParent()
{
if (2 != mDeletedCount)
fail("managees outliving manager!");
}
protected:
@ -66,6 +70,7 @@ protected:
DeallocPTestShutdownSubsub(PTestShutdownSubsubParent* actor)
{
delete actor;
++mDeletedCount;
return true;
}
@ -75,6 +80,7 @@ protected:
private:
bool mExpectCrash;
int mDeletedCount;
};