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
}
PTY::~PTY() {
_close();
}
int PTY::get_cols() const {
return cols;
}
@ -202,6 +198,9 @@ void PTY::_notification(int p_what) {
_run(UV_RUN_NOWAIT);
}
break;
case NOTIFICATION_EXIT_TREE:
_close();
break;
}
}

View file

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