Author: suokko
Date: Wed Sep 17 12:16:13 2008
New Revision: 29515

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29515&view=rev
Log:
Revert "Fixed network manager destructor not to have memory access problems."

This reverts commit 501b913801c4f71b94d5bc4aeae000e459be3f4d.

Modified:
    tags/1.4.5/src/network_worker.cpp

Modified: tags/1.4.5/src/network_worker.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/tags/1.4.5/src/network_worker.cpp?rev=29515&r1=29514&r2=29515&view=diff
==============================================================================
--- tags/1.4.5/src/network_worker.cpp (original)
+++ tags/1.4.5/src/network_worker.cpp Wed Sep 17 12:16:13 2008
@@ -135,8 +135,7 @@
 };
 
 
-bool volatile managed = false;
-bool raw_data_only = false;
+bool managed = false, raw_data_only = false;
 typedef std::vector< buffer* > buffer_set;
 buffer_set outgoing_bufs[NUM_SHARDS];
 
@@ -749,20 +748,11 @@
                                DBG_NW << "thread exited...\n";
                        }
 
-                       // Condition variables must be deleted first as
-                       // they make reference to mutexs. If the mutexs
-                       // are destroyed first, the condition variables
-                       // will access memory already freed by way of
-                       // stale mutex. Bad things will follow. ;)
-
                        threads[shard].clear();
-
-                       to_clear[shard].clear();
-
+                       delete shard_mutexes[shard];
+                       shard_mutexes[shard] = NULL;
                        delete cond[shard];
                        cond[shard] = NULL;
-                       delete shard_mutexes[shard];
-                       shard_mutexes[shard] = NULL;
                }
 
                delete  stats_mutex;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to