[cairo] reference counting vs garbage collection
Keith Packard
keithp at keithp.com
Wed Jan 5 10:53:56 PST 2005
Around 11 o'clock on Jan 5, Owen Taylor wrote:
> I think making destroy unref in this manner is a serious mistake, because
> it makes things *very* hard for language bindings; for a language binding,
> reference counting (keeping memory alive) must be independent from method
> called by the application.
The language binding is free to separate these two activities by simply
calling _ref before _destroy. Again, the goal is to preserve the symmetry
for manually allocated memory environments, which is broken if it must:
_create
...
_destroy
_unref
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050105/d12914b4/attachment.pgp
More information about the cairo
mailing list