自定义内存分配池

This commit is contained in:
2026-07-29 18:08:57 +08:00
parent 18edce4838
commit 84c4082e82
18 changed files with 325 additions and 188 deletions
+14 -2
View File
@@ -4,11 +4,13 @@
#include <QObject>
#include <QTimer>
#include <QKeyEvent>
#include <QThread>
#include <map>
class Back_End : public QObject {
Q_OBJECT
public:
QMap<QString, Qt::Key> function_map;
std::map<QString, Qt::Key> function_map;
bool match(QKeyEvent* e, const QString& function);
static Back_End* instance();
int YsGetAfGain();
@@ -22,12 +24,22 @@ public:
QString get_screenshot_save_dir_path();
QString get_screenshot_save_file_name();
QString get_audio_file_location();
void stop_mock_thread() {
if (mock_thread) {
mock_thread->quit();
mock_thread->wait();
mock_thread = nullptr;
}
}
Back_End(const Back_End&) = delete;
Back_End& operator=(const Back_End&) = delete;
void call_back_data_func(int channel, void *pData, int i_length);
protected:
Back_End();
~Back_End() override = default;
~Back_End() override {
stop_mock_thread();
}
QThread* mock_thread{};
};
#endif