Skip to content
Commit 4151bce6 authored by Christian Hergert's avatar Christian Hergert 💬
Browse files

bytes: avoid intermediate refs in g_bytes_new_from_bytes()

When referencing a GBytes that is already a slice of another GBytes, we
can avoid referencing the intermediate GBytes and instead reference the
root bytes.

Doing so helps avoid keeping N GBytes instances alive when the
intermediates would have otherwise been finalized.

https://bugzilla.gnome.org/show_bug.cgi?id=792780
parent 801accf7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment