Re: Using GObject library to create a lot of objects
- From: Fabrício Barros Cabral <fxcabral yahoo com br>
- To: Falls Huang <bhuang qubit-star com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Using GObject library to create a lot of objects
- Date: Sun, 06 Mar 2005 01:53:41 -0300
On Sun, 2005-03-06 at 11:30 +0800, Falls Huang wrote:
Hello!
Hi!
(sorry for my poor english first)
I took a glance at the src of gobject. It's seemed that the gobject
doesn't have a "copy-on-write" function which QT's share class has.
(http://doc.trolltech.com/4.0/shclass.html)
If u want to create thousands of GObject and don't modified them at
once, I suggest u use some methods which can achieve "copy-on-write" in
GObject ( I don't know how to do :( ).
btw: Why don't the developers of GObject add copy-on-write function to
GOject ? Does the GObject really need copy-on-write ?
I think g_object_ref () could do it to you. This fuction gets a
reference to an object, increments the reference count and return a
another reference to the same object, like these "shared classes" in QT.
But it's a good tip. Thanks!
[]'s
--fx
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]