Changeset 3748
- Timestamp:
- 08/31/08 21:12:35
- Files:
-
- trunk/ChangeLog (modified) (2 diffs)
- trunk/libtinymail-camel/tny-camel-folder.c (modified) (3 diffs)
- trunk/libtinymail-camel/tny-camel-store-account.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r3746 r3748 190 190 191 191 2008-06-20 Jose Dapena Paz <jdapena@igalia.com> 192 193 * libtinymail-camel/tny-camel-folder.c:194 192 Fix camel operation references 195 193 … … 237 235 * libtinymail/Makefile.am: 238 236 Added stream cache implementation files. 237 238 2008-06-12 Rob Taylor <rob.taylor@codethink.co.uk> 239 240 * libtinymail-camel/tny-camel-folder.c: 241 * libtinymail-camel/tny-camel-store-account.c: 242 do unrefs in dispose, not finalise for tny-camel-folder and tny-camel-store-account. 239 243 240 244 2008-06-10 Sergio Villar Senin <svillar@igalia.com> trunk/libtinymail-camel/tny-camel-folder.c
r3737 r3748 6046 6046 6047 6047 static void 6048 tny_camel_folder_ finalize (GObject *object)6048 tny_camel_folder_dispose (GObject *object) 6049 6049 { 6050 6050 TnyCamelFolder *self = (TnyCamelFolder*) object; 6051 6051 TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self); 6052 6053 6054 #ifdef DEBUG6055 g_print ("Finalizing TnyCamelFolder: %s\n",6056 priv->folder_name?priv->folder_name:"(cleared)");6057 6058 if (priv->reason_to_live != 0)6059 g_print ("Finalizing TnyCamelFolder, yet TnyHeader instances "6060 "are still alive: %d\n", priv->reason_to_live);6061 #endif6062 6052 6063 6053 if (priv->store) … … 6100 6090 } 6101 6091 6092 if (G_LIKELY (priv->remove_strat)) 6093 g_object_unref (G_OBJECT (priv->remove_strat)); 6094 priv->remove_strat = NULL; 6095 6096 if (G_LIKELY (priv->receive_strat)) 6097 g_object_unref (G_OBJECT (priv->receive_strat)); 6098 priv->receive_strat = NULL; 6099 6100 priv->parent = NULL; 6101 6102 g_static_rec_mutex_unlock (priv->folder_lock); 6103 6104 return; 6105 } 6106 6107 6108 static void 6109 tny_camel_folder_finalize (GObject *object) 6110 { 6111 TnyCamelFolder *self = (TnyCamelFolder*) object; 6112 TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self); 6113 6114 6115 #ifdef DEBUG 6116 g_print ("Finalizing TnyCamelFolder: %s\n", 6117 priv->folder_name?priv->folder_name:"(cleared)"); 6118 6119 if (priv->reason_to_live != 0) 6120 g_print ("Finalizing TnyCamelFolder, yet TnyHeader instances " 6121 "are still alive: %d\n", priv->reason_to_live); 6122 #endif 6123 6124 g_static_rec_mutex_lock (priv->folder_lock); 6125 priv->dont_fkill = FALSE; 6126 6127 if (priv->account && TNY_IS_CAMEL_STORE_ACCOUNT (priv->account)) { 6128 TnyCamelStoreAccountPriv *apriv = TNY_CAMEL_STORE_ACCOUNT_GET_PRIVATE (priv->account); 6129 g_static_rec_mutex_lock (apriv->factory_lock); 6130 apriv->managed_folders = g_list_remove (apriv->managed_folders, self); 6131 g_static_rec_mutex_unlock (apriv->factory_lock); 6132 } 6133 6134 if (G_LIKELY (priv->folder)) 6135 { 6136 camel_object_unref (priv->folder); 6137 priv->folder = NULL; 6138 } 6139 6102 6140 if (G_LIKELY (priv->cached_name)) 6103 6141 g_free (priv->cached_name); 6104 6142 priv->cached_name = NULL; 6105 6106 if (G_LIKELY (priv->remove_strat))6107 g_object_unref (G_OBJECT (priv->remove_strat));6108 priv->remove_strat = NULL;6109 6110 if (G_LIKELY (priv->receive_strat))6111 g_object_unref (G_OBJECT (priv->receive_strat));6112 priv->receive_strat = NULL;6113 6114 priv->parent = NULL;6115 6143 6116 6144 g_static_rec_mutex_unlock (priv->folder_lock); … … 6206 6234 parent_class = g_type_class_peek_parent (class); 6207 6235 object_class = (GObjectClass*) class; 6236 object_class->dispose = tny_camel_folder_dispose; 6208 6237 object_class->finalize = tny_camel_folder_finalize; 6209 6238 trunk/libtinymail-camel/tny-camel-store-account.c
r3705 r3748 799 799 } 800 800 801 802 static void 803 tny_camel_store_account_finalize (GObject *object) 801 static void 802 tny_camel_store_account_dispose (GObject *object) 804 803 { 805 804 TnyCamelStoreAccount *self = (TnyCamelStoreAccount *)object; … … 826 825 } 827 826 827 g_object_unref (priv->msg_queue); 828 829 return; 830 } 831 832 833 static void 834 tny_camel_store_account_finalize (GObject *object) 835 { 836 TnyCamelStoreAccount *self = (TnyCamelStoreAccount *)object; 837 TnyCamelStoreAccountPriv *priv = TNY_CAMEL_STORE_ACCOUNT_GET_PRIVATE (self); 838 828 839 /* g_static_rec_mutex_free (priv->factory_lock); */ 829 840 g_free (priv->factory_lock); … … 833 844 g_free (priv->obs_lock); 834 845 priv->obs_lock = NULL; 835 836 g_object_unref (priv->msg_queue);837 846 838 847 (*parent_class->finalize) (object); … … 2090 2099 object_class = (GObjectClass*) class; 2091 2100 2101 object_class->dispose = tny_camel_store_account_dispose; 2092 2102 object_class->finalize = tny_camel_store_account_finalize; 2093 2103
