Fixes memory leak in NavigationPolygon
This commit is contained in:
parent
3679d49f4b
commit
72e6369a81
@ -363,8 +363,11 @@ void NavigationPolygon::_bind_methods() {
|
|||||||
|
|
||||||
NavigationPolygon::NavigationPolygon() :
|
NavigationPolygon::NavigationPolygon() :
|
||||||
rect_cache_dirty(true),
|
rect_cache_dirty(true),
|
||||||
navmesh_generation(NULL) {
|
navmesh_generation(Mutex::create()) {
|
||||||
navmesh_generation = Mutex::create();
|
}
|
||||||
|
|
||||||
|
NavigationPolygon::~NavigationPolygon() {
|
||||||
|
memdelete(navmesh_generation);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavigationPolygonInstance::set_enabled(bool p_enabled) {
|
void NavigationPolygonInstance::set_enabled(bool p_enabled) {
|
||||||
|
@ -91,6 +91,7 @@ public:
|
|||||||
Ref<NavigationMesh> get_mesh();
|
Ref<NavigationMesh> get_mesh();
|
||||||
|
|
||||||
NavigationPolygon();
|
NavigationPolygon();
|
||||||
|
~NavigationPolygon();
|
||||||
};
|
};
|
||||||
|
|
||||||
class Navigation2D;
|
class Navigation2D;
|
||||||
|
Loading…
Reference in New Issue
Block a user