Commit 06534431 authored by Milian Wolff's avatar Milian Wolff

Unregister qmljs duchain items in tests

Fixes memory leak reported by LSAN:

```
Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x7fc27ed0df41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x555bcde300f3 in void KDevelop::TypeSystem::registerTypeClass<QmlJS::FunctionType, KDevelop::MergeIdentifiedType<KDevelop::FunctionType>::Data>() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/language/duchain/types/typeregister.h:144
    #2 0x555bcde300f3 in QmlJS::registerDUChainItems() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/plugins/qmljs/duchain/helper.cpp:307
```
parent 53b55e6f
......@@ -48,6 +48,8 @@ void TestContexts::initTestCase()
void TestContexts::cleanupTestCase()
{
QmlJS::unregisterDUChainItems();
TestCore::shutdown();
}
......
......@@ -52,6 +52,8 @@ void TestDeclarations::initTestCase()
void TestDeclarations::cleanupTestCase()
{
QmlJS::unregisterDUChainItems();
TestCore::shutdown();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment