Remove CHATTERINO_TEST definition (#4526)

This commit is contained in:
pajlada
2023-04-09 12:18:56 +02:00
committed by GitHub
parent 6cbf750ec5
commit c8e1741e47
8 changed files with 11 additions and 44 deletions
+1 -9
View File
@@ -19,14 +19,6 @@
#include <memory>
#include <mutex>
#ifdef CHATTERINO_TEST
// When running tests, the ImageExpirationPool destructor can be called before
// all images are deleted, leading to a use-after-free of its mutex. This
// happens despite the lifetime of the ImageExpirationPool being (apparently)
// static. Therefore, just disable it during testing.
# define DISABLE_IMAGE_EXPIRATION_POOL
#endif
namespace chatterino {
namespace detail {
template <typename Image>
@@ -136,7 +128,7 @@ private:
private:
// Timer to periodically run freeOld()
QTimer freeTimer_;
QTimer *freeTimer_;
std::map<Image *, std::weak_ptr<Image>> allImages_;
std::mutex mutex_;
};