ThreadPool now working with no memory leaks
This commit is contained in:
@@ -40,12 +40,15 @@ Seele::SceneView::SceneView(Gfx::PGraphics graphics, PWindow owner, const Viewpo
|
||||
plane->setWorldScale(Vector(100, 100, 100));
|
||||
scene->addPrimitiveComponent(plane);
|
||||
|
||||
PMyComponent myComp = new MyComponent();
|
||||
PMyOtherComponent myOtherComp = new MyOtherComponent();
|
||||
PActor actor = new Actor();
|
||||
actor->setRootComponent(myComp);
|
||||
myComp->addChildComponent(myOtherComp);
|
||||
scene->addActor(actor);
|
||||
for(uint32 i = 0; i < 1; ++i)
|
||||
{
|
||||
PMyComponent myComp = new MyComponent();
|
||||
PMyOtherComponent myOtherComp = new MyOtherComponent();
|
||||
PActor actor = new Actor();
|
||||
actor->setRootComponent(myComp);
|
||||
myComp->addChildComponent(myOtherComp);
|
||||
scene->addActor(actor);
|
||||
}
|
||||
scene->start();
|
||||
|
||||
PRenderGraphResources resources = new RenderGraphResources();
|
||||
|
||||
@@ -75,8 +75,8 @@ void Window::setFocused(PView view)
|
||||
Job Window::viewWorker(size_t viewIndex)
|
||||
{
|
||||
WindowView* windowView = views[viewIndex];
|
||||
windowView->view->beginUpdate();
|
||||
windowView->view->update();
|
||||
co_await windowView->view->beginUpdate();
|
||||
co_await windowView->view->update();
|
||||
{
|
||||
std::scoped_lock lock(windowView->workerMutex);
|
||||
windowView->view->commitUpdate();
|
||||
|
||||
Reference in New Issue
Block a user