As stated in the Cairo Memory Management documentation, reference() and destroy() should not be part of the public API:
Refcounted opaque types all have a ..._reference() function to increase the refcount by one and a ..._destroy() to decrease the refcount by one. These should not be exposed to the user of the language binding, but rather used to implement memory management within the language binding.
As stated in the Cairo Memory Management documentation,
reference()anddestroy()should not be part of the public API: