Re: [clutter] Unrefrencing

2008-06-18 Thread Mike Massonnet
On Wed, Jun 18, 2008 at 01:58:50PM +0800, HASWANI HARISH-VCKR47 wrote:
  
 Hi All,
 
 Here is my confusion : ptr is an actor, which is added to stage. 
 Later on unreferenced and initialized with new texture. After adding new 
 texture, I am adding again this ptr to stage.
 Here is code: 
 
 
 ClutterActor *ptr=clutter_texture_new_from_pixbuf(pixbuf);
 .
 .
 .
 g_object_unref(G_OBJECT(ptr))
 ptr=clutter_texture_new_from_pixbuf(pixbuf1);
 
 
 Issue : when I am executing this piece of code. I am getting  this error: 
 (./test-behave:530): Clutter-CRITICAL **: clutter_actor_paint: assertion 
 `CLUTTE
 R_IS_ACTOR (self)' failed
 
 Please tell me where I am goofing up.

I think you must use clutter_actor_destroy instead of g_object_unref.

 Regards,
 Harish Haswani,

Cheers
Mike
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]



[clutter] clutter_actor_destroy

2008-06-18 Thread Peter Csaszar
Hi,

By the way, I found that clutter_actor_destroy calls
clutter_actor_unparent only if the parent is a container. If the parent
is just an other actor (so it is a composite one) clutter_actor_unparent
is not called on the child. However g_object_dipose is called in both case.

Is this intensional? I am just worry about to call dispose on an actor
we are still using as child of other. Or we just should not use
clutter_actor_destroy for actors in use by some parent actor? Or may be
I missed something?

Br,
Peter Csaszar







smime.p7s
Description: S/MIME Cryptographic Signature