Add a bit of description about how handles work in the C API.

This commit is contained in:
Peter Johnson
2016-08-26 01:00:38 -07:00
parent 2acca6eeb1
commit 80b15b7fe5

View File

@@ -17,6 +17,17 @@ extern "C" {
struct CvMat;
//
// The C API is handle-based. Sources and sinks are reference counted
// internally to the library. Any time a source or sink handle is returned
// or provided to a callback, the reference count is incremented.
// Calling CS_ReleaseSource() or CS_ReleaseSink() decrements the reference
// count, and when the reference count reaches zero, the object is destroyed.
// Connecting a source to a sink increments the reference count of the source,
// and when the sink is destroyed (its reference count reaches zero), the
// source reference count is decremented.
//
//
// Typedefs
//