Re: [PATCH spice-server] display-channel: Clean more stuff on finalize

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 28, 2017 at 03:42:17PM +0000, Frediano Ziglio wrote:
> Release surfaces, cache and monitor configurations.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/display-channel.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/server/display-channel.c b/server/display-channel.c
> index 288969c..60947fc 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -77,9 +77,14 @@ static void
>  display_channel_finalize(GObject *object)
>  {
>      DisplayChannel *self = DISPLAY_CHANNEL(object);
> +    DisplayChannelPrivate *priv = self->priv;

Note: There are more changes in this patch caused by this cosmetic
change than cleanup additions (I'd just keep using self->priv throughout
_finalize())

>  
> -    g_array_unref(self->priv->video_codecs);
> -    g_free(self->priv);
> +    display_channel_destroy_surfaces(self);
> +    image_cache_reset(&priv->image_cache);

Could be display_channel_reset_image_cache()

Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

> +    g_array_unref(priv->video_codecs);
> +
> +    monitors_config_unref(priv->monitors_config);
> +    g_free(priv);
>  
>      G_OBJECT_CLASS(display_channel_parent_class)->finalize(object);
>  }
> -- 
> 2.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]