Fixes memory leak in NavigationPolygon
This commit is contained in:
parent
3679d49f4b
commit
72e6369a81
2 changed files with 6 additions and 2 deletions
|
@ -363,8 +363,11 @@ void NavigationPolygon::_bind_methods() {
|
|||
|
||||
NavigationPolygon::NavigationPolygon() :
|
||||
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) {
|
||||
|
|
|
@ -91,6 +91,7 @@ public:
|
|||
Ref<NavigationMesh> get_mesh();
|
||||
|
||||
NavigationPolygon();
|
||||
~NavigationPolygon();
|
||||
};
|
||||
|
||||
class Navigation2D;
|
||||
|
|
Loading…
Reference in a new issue