[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/movie_root.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/movie_root.cpp |
Date: |
Thu, 13 Sep 2007 15:56:25 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/09/13 15:56:25
Modified files:
. : ChangeLog
server : movie_root.cpp
Log message:
* server/movie_root.cpp: cleanup debugging of ever growing list
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4305&r2=1.4306
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.90&r2=1.91
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4305
retrieving revision 1.4306
diff -u -b -r1.4305 -r1.4306
--- ChangeLog 13 Sep 2007 15:41:49 -0000 1.4305
+++ ChangeLog 13 Sep 2007 15:56:24 -0000 1.4306
@@ -1,5 +1,9 @@
2007-09-13 Sandro Santilli <address@hidden>
+ * server/movie_root.cpp: cleanup debugging of ever growing list
+
+2007-09-13 Sandro Santilli <address@hidden>
+
* server/button_character_instance.{cpp,h}: implement unload() in an
attempt to properly mark as unloaded any character registered in the
global instance list (could happen for child sprites).
Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -b -r1.90 -r1.91
--- server/movie_root.cpp 13 Sep 2007 15:41:49 -0000 1.90
+++ server/movie_root.cpp 13 Sep 2007 15:56:25 -0000 1.91
@@ -1214,23 +1214,14 @@
// Mark global key object
if ( _keyobject ) _keyobject->setReachable();
- // TODO: check if we need to mark _liveChars too
- // it should be checked that all characters there
- // are NOT unloaded as GC collector is run *after*
- // cleanup of the list (supposedly).
- // Also, it's likely that any non-unloaded character
- // will be also marked as reachable by scanning the
- // DisplayList...
+ // TODO: we should theoretically NOT need to mark _liveChars here
+ // as any element in this list should be NOT unloaded and
+ // thus marked as reachable by it's parent or properly unloaded
+ // and thus removed from this list by cleanupDisplayList.
+ // Due to some bug I'm researching on, we'll mark them for now...
+ // See http://savannah.gnu.org/bugs/index.php?21070
//
- // Well, playing SimGirl.swf and hanging out with cheeks triggers
- // exactly this problem, one of the registered live movies are not
marked
- // Dunno exactly why, since none of them should be marked as unloaded,
thus
- // reachable somewhere... anyway let's do it
- //
- // WARNING: this list will keeps growing, as we don't properly unload()
- // all characters...
- //
- log_debug("Marking %d live chars", _liveChars.size());
+ //log_debug("Marking %d live chars", _liveChars.size());
for (LiveChars::const_iterator i=_liveChars.begin(), e=_liveChars.end();
i != e; ++i)
{
@@ -1255,9 +1246,25 @@
void
movie_root::cleanupDisplayList()
{
+
+#define GNASH_DEBUG_INSTANCE_LIST 1
+
+#ifdef GNASH_DEBUG_INSTANCE_LIST
+ // This
+ static size_t maxLiveChars = 0;
+#endif
+
// Remove unloaded characters from the _liveChars list
_liveChars.remove_if(boost::bind(&character::isUnloaded, _1));
+#ifdef GNASH_DEBUG_INSTANCE_LIST
+ if ( _liveChars.size() > maxLiveChars )
+ {
+ maxLiveChars = _liveChars.size();
+ log_debug("Global instance list grew to %d entries",
maxLiveChars);
+ }
+#endif
+
// Let every sprite cleanup the local DisplayList
//
// TODO: we might skip this additinal scan by delegating
- [Gnash-commit] gnash ChangeLog server/movie_root.cpp,
Sandro Santilli <=