[Spice-devel] [PATCH spice-server 07/10] red-channel-client: Avoid weird memory references using MarkerPipeItem

Christophe Fergeau cfergeau at redhat.com
Tue Sep 12 09:29:12 UTC 2017


On Tue, Sep 12, 2017 at 04:15:15AM -0400, Frediano Ziglio wrote:
> > 
> > On Mon, Sep 11, 2017 at 11:15:44AM +0100, Frediano Ziglio wrote:
> > > Instead of having MarkerPipeItem pointing to a variable on an external
> > > stuff with the possibility to forget to reset it or having possibly
> > > dangling pointers use reference counting to keep the item and
> > > mark the item when sent.
> > 
> > Look good to me, I would have added some more details in the log (that
> > this stores a reference to an external variable because we need to know
> > its value after the item has been processed and freed), this makes it
> > easier to understand why you want reference counting.
> > 
> > Christophe
> > 
> 
> How does it sound adding:
> 
> "Storing a pointer to an external variable was used to be able to use
> this variable after the object was freed."

I probably would detail this even more.

Christophe


More information about the Spice-devel mailing list