2

QTimer関数への繰り返し呼び出しをトリガーするために を使用していますが、最終的に次のエラーでクラッシュしました

QEventDispatcherWin32::registerTimer: Failed to create a timer (The current process has used all of its system allowance of handles for Window Manager objects.)
struct HWND__ *__cdecl qt_create_internal_window(const class QEventDispatcherWin32 *): CreateWindow() for QEventDispatcherWin32 internal window failed (The current process has used all of its system allowance of handles for Window Manager objects.)
Qt: INTERNAL ERROR: failed to install GetMessage hook: 1158, The current process has used all of its system allowance of handles for Window Manager objects.

このリンクに記載されているように、タイマー オブジェクトはこれらのハンドルを使用します。これを止める方法はありますか?私のプログラムは、再起動せずにユーザー入力なしで常に実行する必要があり、システム許容量を増やすと (一部の人が示唆しているように)、クラッシュを防ぐのではなく、クラッシュを遅らせるだけのようです。

タイマーコード

QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(mFunc()));
timer->start(15000);

タイマーは他の場所では再作成されません。

4

0 に答える 0