All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH v2 1/8] Properly cleaning up the display tabs
Date: Wed, 15 Oct 2014 21:58:10 +0900	[thread overview]
Message-ID: <20141015125810.GC1189@swordfish> (raw)
In-Reply-To: 1413310159-30577-2-git-send-email-joe.konno@linux.intel.com

[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]

On (10/14/14 11:09), Joe Konno wrote:
>  src/display.h   |  1 +
>  2 files changed, 12 insertions(+)
> 
> diff --git a/src/display.cpp b/src/display.cpp
> index 123620a..e227e74 100644
> --- a/src/display.cpp
> +++ b/src/display.cpp
> @@ -87,6 +87,17 @@ void reset_display(void)
>  	resetterm();
>  }
>  
> +void close_display(void)
> +{
> +	for (unsigned int i = 0; i < tab_windows.size(); i++) {
> +		if (tab_windows[tab_names[i]])
> +			delete tab_windows[tab_names[i]];
> +		tab_windows[tab_names[i]] = NULL;
> +	}
> +
> +	tab_names.clear();
> +}

here and in other patch -- why does it matter? we are exiting,
memory will be freed anyway, etc. why take that extra effort?

	-ss

>  WINDOW *tab_bar = NULL;
>  WINDOW *bottom_line = NULL;
> diff --git a/src/display.h b/src/display.h
> index 9af3ec0..c3e8d61 100644
> --- a/src/display.h
> +++ b/src/display.h
> @@ -34,6 +34,7 @@ using namespace std;
>  
>  extern void init_display(void);
>  extern void reset_display(void);
> +extern void close_display(void);
>  extern int ncurses_initialized(void);
>  extern void show_tab(unsigned int tab);
>  extern void show_next_tab(void);
> -- 
> 2.1.2
> 
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
> 

             reply	other threads:[~2014-10-15 12:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 12:58 Sergey Senozhatsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-10-22 14:49 [Powertop] [PATCH v2 1/8] Properly cleaning up the display tabs Joe Konno
2014-10-22 12:17 Sergey Senozhatsky
2014-10-17 22:53 Magnus Fromreide
2014-10-17 18:12 Joe Konno
2014-10-14 18:09 Joe Konno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141015125810.GC1189@swordfish \
    --to=powertop@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.