gnome-games r8141 - trunk/aisleriot
- From: jclinton svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8141 - trunk/aisleriot
- Date: Tue, 21 Oct 2008 19:44:37 +0000 (UTC)
Author: jclinton
Date: Tue Oct 21 19:44:37 2008
New Revision: 8141
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8141&view=rev
Log:
Destroy the card actors when freeing the slots
Modified:
trunk/aisleriot/game.c
Modified: trunk/aisleriot/game.c
==============================================================================
--- trunk/aisleriot/game.c (original)
+++ trunk/aisleriot/game.c Tue Oct 21 19:44:37 2008
@@ -37,6 +37,7 @@
#include "util.h"
#include <libgames-support/games-runtime.h>
+#include <clutter/clutter-actor.h>
#include "game.h"
@@ -231,12 +232,20 @@
clear_slots (AisleriotGame *game,
gboolean notify)
{
- guint i, n_slots;
+ guint i, n_slots, card_num;
n_slots = game->slots->len;
for (i = 0; i < n_slots; ++i) {
Slot *slot = game->slots->pdata[i];
+ for (card_num = 0; card_num < slot->card_images->len; card_num++) {
+ ClutterActor *actor = g_ptr_array_index (slot->card_images, card_num);
+ if (actor) {
+ clutter_actor_destroy (actor);
+ g_object_unref (actor);
+ }
+ }
+
g_byte_array_free (slot->cards, TRUE);
g_ptr_array_free (slot->card_images, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]