[shutdown] free the terminfo cache (and input) earlier

pull/2576/head
nick black 2 years ago
parent 87704a3c3c
commit 82921e2f0d
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -930,6 +930,7 @@ ncdirect* ncdirect_core_init(const char* termtype, FILE* outfp, uint64_t flags){
}
}
if(ncvisual_init(loglevel)){
free_terminfo_cache(&ret->tcache);
goto err;
}
unsigned cgeo, pgeo; // both are don't-cares

@ -1438,6 +1438,7 @@ int notcurses_stop(notcurses* nc){
}
egcpool_dump(&nc->pool);
free(nc->lastframe);
free_terminfo_cache(&nc->tcache);
// get any current stats loaded into stash_stats
notcurses_stats_reset(nc, NULL);
if(!(nc->flags & NCOPTION_SUPPRESS_BANNERS)){
@ -1449,7 +1450,6 @@ int notcurses_stop(notcurses* nc){
ret |= pthread_mutex_destroy(&nc->stats.lock);
ret |= pthread_mutex_destroy(&nc->pilelock);
fbuf_free(&nc->rstate.f);
free_terminfo_cache(&nc->tcache);
free(nc);
}
return ret;

@ -157,6 +157,7 @@ query_rgb(void){
void free_terminfo_cache(tinfo* ti){
stop_inputlayer(ti);
loginfo("brought down input layer");
free(ti->termversion);
free(ti->esctable);
#ifdef __linux__
@ -169,6 +170,7 @@ void free_terminfo_cache(tinfo* ti){
}
#endif
free(ti->tpreserved);
loginfo("destroyed terminfo cache");
}
// compare one terminal version against another. numerics, separated by

Loading…
Cancel
Save