gui: IPCPreviewWorker(): Don't allocate mapfunctor on heap
This commit is contained in:
parent
69c2956a1f
commit
86cc16d15d
@ -10,13 +10,11 @@ IPCPreviewWorker::IPCPreviewWorker()
|
|||||||
|
|
||||||
void IPCPreviewWorker::start(RenderConfig config, const QVector<RenderTarget> &targets, QLocalSocket *peer)
|
void IPCPreviewWorker::start(RenderConfig config, const QVector<RenderTarget> &targets, QLocalSocket *peer)
|
||||||
{
|
{
|
||||||
|
|
||||||
stop();
|
stop();
|
||||||
/* TODO: memleak */
|
auto mapFunctor = PreviewGeneratorMapFunctor();
|
||||||
auto mapFunctor = new PreviewGeneratorMapFunctor();
|
mapFunctor.setRenderConfig(config);
|
||||||
mapFunctor->setRenderConfig(config);
|
|
||||||
|
|
||||||
previewWorkerWatcher.setFuture(QtConcurrent::mapped(targets, *mapFunctor));
|
previewWorkerWatcher.setFuture(QtConcurrent::mapped(targets, mapFunctor));
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPCPreviewWorker::stop()
|
void IPCPreviewWorker::stop()
|
||||||
|
Loading…
Reference in New Issue
Block a user