On 07/06/2012 12:21 AM, Marc-André Lureau wrote:
On Thu, Jul 5, 2012 at 10:43 PM, Uri Lublin<uril@xxxxxxxxxx> wrote:
+ ref = atomic_dec(&info->ref);
+ if (ref == 0) {
+ memset(info, 0, sizeof(*info));
+ g_free(info);
+ }
we should really be using the g_atomic operations.
g_atomic_int_dec_and_test () is idiomatic for unref (it may be more
correct). the memset isn't really helping here.
done.
The memset was there to catch memory problems (bugs). I dropped it.
Thanks,
Uri.
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel