summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-02 21:41:42 +0200
committerGitHub <noreply@github.com>2019-07-02 21:41:42 +0200
commite0d610203c5194400a5932f36ae0d96c8ede7f0f (patch)
tree68c2fb70ffafe632d82a4292ca8c0fade49da448 /scene/3d
parent9e1e4defefdd2e08eb1a8672c27bef25c58de88b (diff)
parentf7dad789e958fed81bb167b14c5add45ef723cf9 (diff)
Merge pull request #30254 from bojidar-bg/30224-docdata-generate
Fix various memory leaks and errors
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/gi_probe.cpp1
-rw-r--r--scene/3d/particles.cpp1
-rw-r--r--scene/3d/soft_body.cpp1
3 files changed, 3 insertions, 0 deletions
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 414e932f61..a04f156d80 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -571,4 +571,5 @@ GIProbe::GIProbe() {
}
GIProbe::~GIProbe() {
+ VS::get_singleton()->free(gi_probe);
}
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index 2bcd0eaa46..00a168fc39 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -411,6 +411,7 @@ Particles::Particles() {
particles = VS::get_singleton()->particles_create();
set_base(particles);
+ one_shot = false; // Needed so that set_emitting doesn't access uninitialized values
set_emitting(true);
set_one_shot(false);
set_amount(8);
diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp
index a9d96292a1..b9f6865298 100644
--- a/scene/3d/soft_body.cpp
+++ b/scene/3d/soft_body.cpp
@@ -712,6 +712,7 @@ SoftBody::SoftBody() :
}
SoftBody::~SoftBody() {
+ PhysicsServer::get_singleton()->free(physics_rid);
}
void SoftBody::reset_softbody_pin() {