[cairo] [PATCH] fix bugs 15797 (1.8) and 18632 (master)
bonzini at gnu.org
Thu Dec 11 00:00:10 PST 2008
> I don't really like trusting third party code to release the object at a
> specific time, especially if it has callbacks for destruction.
> I plan on applying something like the following patch to trunk.
Of course I have no problems with the patch (with the condition reversed).
I will just point out that the reason for the destruction callbacks, is
that Quartz uses reference counting so in principle the creator may not
know when the data will be unused; but Quartz ensures that the callbacks
are called as soon as the reference count becomes 0. And since Cairo
does not store these objects anywhere (there are no CG*Retain calls in
cairo-quartz-surface.c except an unrelated one), this ensures that there
would be no dangling pointers.
More information about the cairo