Certainly your suggestions would be applicable under most normal situations.

However, there may be cases where I need to use a number of actors with different images that are created and destroyed simultaneously or at staggered intervals. I have to anticipate the unknown because a lot is dependent on user input (clicks, movement etc.)

As you suggested earlier clutter_container_remove is probably the way to go for me ...


Emmanuele Bassi wrote:
On Sun, 2008-02-10 at 15:03 +0000, Emmanuele Bassi wrote:

Besides, if I wanted to have more than one of my explosions could I not use g_new0?

unless you want to allocate an array of items, but in that case using
g_new0 will not do what you think it does.

it also depends on whether you want to use different images, in which
case you should probably keep the texture actor load the image and then
set the pixbuf of the texture, and hide the texture when you don't need
it (the texture will be removed from video memory and will stay in main
memory). or, if you plan on reusing the same image, it's fairly
convenient to keep the texture and hide/show it on demand - again, the
image will be moved in main memory and will not occupy video memory.

these two options are usually faster than just destroying/recreating the
texture actor, because you don't need to load the file from disk all the
time.

ciao,
 Emmanuele.


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

Reply via email to