Clean up memory leak due to unfreed connection etc objects in RegisteredDatabases array.