summaryrefslogtreecommitdiff
path: root/docs/design/part-standards.txt
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2016-12-05 18:16:34 -0300
committerThibault Saunier <tsaunier@gnome.org>2016-12-06 14:08:14 -0300
commitd1c79fc1774c80873b956bfb187ad57042deedbb (patch)
tree3f9a620c1d9acbcd516bbf5e8fa314b6dcf352c0 /docs/design/part-standards.txt
parentdbe3d2b328113b468e19adc2ff39acc22e151069 (diff)
docs: Remove design doc as they have been moved to gst-docs
https://bugzilla.gnome.org/show_bug.cgi?id=775667
Diffstat (limited to 'docs/design/part-standards.txt')
-rw-r--r--docs/design/part-standards.txt54
1 files changed, 0 insertions, 54 deletions
diff --git a/docs/design/part-standards.txt b/docs/design/part-standards.txt
deleted file mode 100644
index 5d17185bce..0000000000
--- a/docs/design/part-standards.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-Ownership of dynamic objects
-----------------------------
-
-Any object-oriented system or language that doesn't have automatic garbage
-collection has many potential pitfalls as far as the pointers go. Therefore,
-some standards must be adhered to as far as who owns what.
-
-Strings
-~~~~~~~
-
-Arguments passed into a function are owned by the caller, and the function
-will make a copy of the string for its own internal use. The string should
-be const gchar *. Strings returned from a function are always a copy of the
-original and should be freed after usage by the caller.
-
- ex:
-
- name = gst_element_get_name (element); /* copy of name is made */
- .. use name ..
- g_free (name); /* free after usage */
-
-
-Objects
-~~~~~~~
-
-Objects passed into a function are owned by the caller, any additional
-reference held to the object after leaving the function should increase the
-refcount of that object.
-
-Objects returned from a function are owned by the caller. This means that the
-called should _free() or _unref() the object after usage.
-
- ex:
-
- peer = gst_pad_get_peer (pad); /* peer with increased refcount */
- if (peer) {
- .. use peer ..
- gst_object_unref (GST_OBJECT (peer)); /* unref peer after usage */
- }
-
-
-Iterators
-~~~~~~~~~
-
-When retrieving multiple objects from an object an iterator should be used.
-The iterator allows you to access the objects one after another while making
-sure that the set of objects retrieved remains consistent.
-
-Each object retrieved from an iterator has its refcount increased or is a
-copy of the original. In any case the object should be unreffed or freed
-after usage.
-
-
-