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.

Regards,
Harish Haswani,
LJ-P2P, GRAPHICS, MME Group, MIEL, Bangalore, INDIA
Ph: 91-80-26014164

-----Original Message-----
From: Peter Csaszar [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 13, 2008 4:32 PM
To: HASWANI HARISH-VCKR47
Subject: Re: [clutter] Unrefrencing

Hi,

generally in case of any GObject you are expected to use
g_object_unref() and never to use g_free(). So in this case you should write 
the next:

ClutterActor *ptr=clutter_texture_new_from_pixbuf(pixbuf);
.
.
.
g_object_unref(G_OBJECT(ptr))
ptr=clutter_texture_new_from_pixbuf(pixbuf1);

Br,
Peter


HASWANI HARISH-VCKR47 írta:
> Hi All,
>  
> I am creating a actor like this :
>  
>  
> ClutterActor *ptr=clutter_texture_new_from_pixbuf(pixbuf);
> .
> .
> .
> after some time I am doing :
>  
> ptr=clutter_texture_new_from_pixbuf(pixbuf1);
>  
>  
> is this correct ? who is responsible to free old memory and if my app 
> itself is responsible, can I use free or g_object_unref()
>  
>  
>  
> Regards,
> Harish Haswani,
> LJ-P2P, GRAPHICS, MME Group, MIEL, Bangalore, INDIA
> Ph: 91-80-26014164
>  


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

Reply via email to