#45 Resouce leak in MS ActiveTest

-- deleted --
closed-fixed
5
2002-05-07
2002-05-07
No

Related to cppunit v1.8.0
src\msvc6\testrunner\ActiveTest.cpp

ActiveTest::run calls DuplicateHandle() on every test
run and there is no CloseHandle() calls.

to fix call CloseHandle() from
ActiveTest::threadFunction(), for example:

UINT ActiveTest::threadFunction (LPVOID thisInstance)
{
ActiveTest *test = (ActiveTest *)thisInstance;

test->run ();

// two lines added
CloseHandle(test->m_threadHandle);
test->m_threadHandle = INVALID_HANDLE_VALUE;

test->m_runCompleted.SetEvent ();

return 0;
}

or remove DuplicateHandle() and m_threadHandle all
together, as it is not used yet.

Discussion

  • Baptiste Lepilleur

    Logged In: YES
    user_id=196852

    Thanks! I included the fix.

    Baptiste.

     
  • Baptiste Lepilleur

    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks