Fix memory leak in loadWorld()
This commit is contained in:
parent
41e2be33ab
commit
001a7ce38a
1 changed files with 7 additions and 0 deletions
|
@ -7,7 +7,10 @@
|
||||||
#include <assimp/Importer.hpp>
|
#include <assimp/Importer.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/postprocess.h>
|
#include <assimp/postprocess.h>
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "renderer.h"
|
#include "renderer.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
@ -490,6 +493,10 @@ int main(int argc, char* argv[]) {
|
||||||
delete mesh;
|
delete mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(auto light : world->lights) {
|
||||||
|
delete light;
|
||||||
|
}
|
||||||
|
|
||||||
delete world;
|
delete world;
|
||||||
|
|
||||||
renderer->destroyRenderTarget(target);
|
renderer->destroyRenderTarget(target);
|
||||||
|
|
Reference in a new issue