mail-archives/gtk-sharp-list/2005-June/005967.html

90 строки
3.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] Increasing Ref count manually
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Increasing%20Ref%20count%20manually&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="005966.html">
<LINK REL="Next" HREF="005968.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] Increasing Ref count manually</H1>
<B>MDK</B>
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Increasing%20Ref%20count%20manually&In-Reply-To="
TITLE="[Gtk-sharp-list] Increasing Ref count manually">mdk at mdk.org.pl
</A><BR>
<I>Wed Jun 8 17:47:01 EDT 2005</I>
<P><UL>
<LI>Previous message: <A HREF="005966.html">[Gtk-sharp-list] ComboBox and keyboard
</A></li>
<LI>Next message: <A HREF="005968.html">[Gtk-sharp-list] Increasing Ref count manually
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#5967">[ date ]</a>
<a href="thread.html#5967">[ thread ]</a>
<a href="subject.html#5967">[ subject ]</a>
<a href="author.html#5967">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Hello,
I've got a strange problem. I'd like to manually increase the ref count
of a Glib.Object. The exact opposite to Unref(); Is it somehow possible,
without digging to much?
The reason I need this is: a bug in gst-sharp (I suppose). There is a
function Gst.Bin.Remove(Gst.Bin Bin1) that removes Bin1 from the calling
Bin. In the gstreamer api this function is described as follows:
*** gst_bin_remove () :
&quot;Remove the element from its associated bin, unparenting it as well.
Unparenting the element means that the element will be dereferenced, so
if the bin holds the only reference to the element, the element will be
freed in the process of removing it from the bin. If you want the
element to still exist after removing, you need to call gst_object_ref
before removing it from the bin.&quot;
And this is exactly what happens. After the Remove (in mono) the Bin
that is to be removed is deallocated. This is not what I want.
--
Micha&#322; Dominik K.
<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">mdk at mdk.org.pl</A>
www.mdk.org.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : <A HREF="http://galactus.ximian.com/pipermail/gtk-sharp-list/attachments/20050608/22272f42/attachment.bin">http://galactus.ximian.com/pipermail/gtk-sharp-list/attachments/20050608/22272f42/attachment.bin</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="005966.html">[Gtk-sharp-list] ComboBox and keyboard
</A></li>
<LI>Next message: <A HREF="005968.html">[Gtk-sharp-list] Increasing Ref count manually
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#5967">[ date ]</a>
<a href="thread.html#5967">[ thread ]</a>
<a href="subject.html#5967">[ subject ]</a>
<a href="author.html#5967">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
mailing list</a><br>
</body></html>