Fixed several leaks in VisualServerScene, RasterizerSceneGLES3 and RasterizerGLES3
This commit is contained in:
parent
eceba5aa6a
commit
e9ac87390c
|
@ -415,4 +415,5 @@ RasterizerGLES3::~RasterizerGLES3() {
|
||||||
|
|
||||||
memdelete(storage);
|
memdelete(storage);
|
||||||
memdelete(canvas);
|
memdelete(canvas);
|
||||||
|
memdelete(scene);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5118,3 +5118,23 @@ void RasterizerSceneGLES3::finalize() {
|
||||||
|
|
||||||
RasterizerSceneGLES3::RasterizerSceneGLES3() {
|
RasterizerSceneGLES3::RasterizerSceneGLES3() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RasterizerSceneGLES3::~RasterizerSceneGLES3() {
|
||||||
|
|
||||||
|
memdelete(default_material.get_data());
|
||||||
|
memdelete(default_material_twosided.get_data());
|
||||||
|
memdelete(default_shader.get_data());
|
||||||
|
memdelete(default_shader_twosided.get_data());
|
||||||
|
|
||||||
|
memdelete(default_worldcoord_material.get_data());
|
||||||
|
memdelete(default_worldcoord_material_twosided.get_data());
|
||||||
|
memdelete(default_worldcoord_shader.get_data());
|
||||||
|
memdelete(default_worldcoord_shader_twosided.get_data());
|
||||||
|
|
||||||
|
memdelete(default_overdraw_material.get_data());
|
||||||
|
memdelete(default_overdraw_shader.get_data());
|
||||||
|
|
||||||
|
memfree(state.spot_array_tmp);
|
||||||
|
memfree(state.omni_array_tmp);
|
||||||
|
memfree(state.reflection_array_tmp);
|
||||||
|
}
|
||||||
|
|
|
@ -852,6 +852,7 @@ public:
|
||||||
void initialize();
|
void initialize();
|
||||||
void finalize();
|
void finalize();
|
||||||
RasterizerSceneGLES3();
|
RasterizerSceneGLES3();
|
||||||
|
~RasterizerSceneGLES3();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // RASTERIZERSCENEGLES3_H
|
#endif // RASTERIZERSCENEGLES3_H
|
||||||
|
|
|
@ -205,4 +205,5 @@ VisualServerRaster::~VisualServerRaster() {
|
||||||
memdelete(VSG::canvas);
|
memdelete(VSG::canvas);
|
||||||
memdelete(VSG::viewport);
|
memdelete(VSG::viewport);
|
||||||
memdelete(VSG::rasterizer);
|
memdelete(VSG::rasterizer);
|
||||||
|
memdelete(VSG::scene);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3333,6 +3333,7 @@ VisualServerScene::~VisualServerScene() {
|
||||||
|
|
||||||
#ifndef NO_THREADS
|
#ifndef NO_THREADS
|
||||||
probe_bake_thread_exit = true;
|
probe_bake_thread_exit = true;
|
||||||
|
probe_bake_sem->post();
|
||||||
Thread::wait_to_finish(probe_bake_thread);
|
Thread::wait_to_finish(probe_bake_thread);
|
||||||
memdelete(probe_bake_thread);
|
memdelete(probe_bake_thread);
|
||||||
memdelete(probe_bake_sem);
|
memdelete(probe_bake_sem);
|
||||||
|
|
Loading…
Reference in New Issue