[rygel] core: Allow owned refs to parent container
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] core: Allow owned refs to parent container
- Date: Tue, 23 Jun 2009 08:02:48 -0400 (EDT)
commit 9efb735a3f86755004f9f189cd6846bd28b64aba
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Jun 23 14:57:28 2009 +0300
core: Allow owned refs to parent container
src/rygel/rygel-media-object.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-media-object.vala b/src/rygel/rygel-media-object.vala
index 719b9e1..2c37223 100644
--- a/src/rygel/rygel-media-object.vala
+++ b/src/rygel/rygel-media-object.vala
@@ -29,5 +29,14 @@ public abstract class Rygel.MediaObject : GLib.Object {
public string id;
public string title;
+ // You can keep both a unowned and owned ref to parent of this MediaObject.
+ // In most cases, one will only need to keep an unowned ref to avoid cyclic
+ // references since usually parent container will keep refs to child items.
+ // However in some cases, one only wants the parent to exist as long as the
+ // child exists and it is in those cases, you will want to use 'parent_ref'.
+ //
+ // You must set 'parent' if you set 'parent_ref' but the opposite is not
+ // mandatory.
public unowned MediaContainer parent;
+ public MediaContainer parent_ref;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]