mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
fix for windows
Windows segfault was only appearing after changes to windowManagerTest, either that or because linux was failing first it wasn't giving windows a chance to fail. see if this works.
This commit is contained in:
parent
0ba22b7969
commit
564d48e95f
4 changed files with 58 additions and 45 deletions
|
|
@ -30,35 +30,5 @@
|
|||
|
||||
namespace testing
|
||||
{
|
||||
class MemoryLeakDetector : public EmptyTestEventListener
|
||||
{
|
||||
public:
|
||||
virtual void OnTestStart(const TestInfo&)
|
||||
{
|
||||
#if defined(TORQUE_OS_WIN)
|
||||
_CrtMemCheckpoint(&memState_);
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void OnTestEnd(const TestInfo& test_info)
|
||||
{
|
||||
if(test_info.result()->Passed())
|
||||
{
|
||||
#if defined(TORQUE_OS_WIN)
|
||||
_CrtMemState stateNow, stateDiff;
|
||||
_CrtMemCheckpoint(&stateNow);
|
||||
int diffResult = _CrtMemDifference(&stateDiff, &memState_, &stateNow);
|
||||
if (diffResult)
|
||||
{
|
||||
FAIL() << "Memory leak of " << stateDiff.lSizes[1] << " byte(s) detected.";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
#if defined(TORQUE_OS_WIN)
|
||||
_CrtMemState memState_;
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue