feat(pty): call _close() on NOTIFICATION_EXIT_TREE

This commit is contained in:
Leroy Hopson 2024-03-01 22:42:37 +13:00
parent 8fa7df29d3
commit e1000adbe5
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
2 changed files with 3 additions and 5 deletions

View file

@ -72,10 +72,6 @@ PTY::PTY() {
#endif #endif
} }
PTY::~PTY() {
_close();
}
int PTY::get_cols() const { int PTY::get_cols() const {
return cols; return cols;
} }
@ -202,6 +198,9 @@ void PTY::_notification(int p_what) {
_run(UV_RUN_NOWAIT); _run(UV_RUN_NOWAIT);
} }
break; break;
case NOTIFICATION_EXIT_TREE:
_close();
break;
} }
} }

View file

@ -40,7 +40,6 @@ namespace godot
}; };
PTY(); PTY();
~PTY();
Status status = STATUS_CLOSED; Status status = STATUS_CLOSED;