gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo...
Date: Wed, 23 Apr 2008 13:29:54 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/04/23 13:29:54

Modified files:
        .              : ChangeLog 
        server         : movie_root.cpp movie_root.h 

Log message:
        add a cleanupAndCollect() private method so we don't forget to clean
        key/mouse listeners before invoking the garbage collector. Fixes a few
        assertion failures with GNASH_PARANOIA_LEVEL > 1 (others still fail).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6355&r2=1.6356
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.179&r2=1.180
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.121&r2=1.122

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6355
retrieving revision 1.6356
diff -u -b -r1.6355 -r1.6356
--- ChangeLog   23 Apr 2008 11:43:46 -0000      1.6355
+++ ChangeLog   23 Apr 2008 13:29:53 -0000      1.6356
@@ -1,5 +1,12 @@
 2008-04-23 Sandro Santilli <address@hidden>
 
+       * server/movie_root.{cpp,h}: add a cleanupAndCollect() private method
+         so we don't forget to clean key/mouse listeners before invoking
+         the garbage collector. Fixes a few assertion failures with
+         GNASH_PARANOIA_LEVEL > 1 (others still fail).
+
+2008-04-23 Sandro Santilli <address@hidden>
+
        * gui/: fb.cpp, fltk.cpp, gtk.cpp, gui.{cpp,h}, kde.cpp, sdl.cpp:
          Make pixel scale a Gui private, and drop accessors, Handle
          it in Gui::notify_mouse_moved, now taking coordinates in 

Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -b -r1.179 -r1.180
--- server/movie_root.cpp       23 Apr 2008 10:37:55 -0000      1.179
+++ server/movie_root.cpp       23 Apr 2008 13:29:54 -0000      1.180
@@ -179,14 +179,15 @@
                clearActionQueue();
        }
 
-       // Delete characters removed from the stage
-       // from the display lists
-       cleanupDisplayList();
+       cleanupAndCollect();
+}
 
-#ifdef GNASH_USE_GC
-       // Run the garbage collector (step back !!)
+void
+movie_root::cleanupAndCollect()
+{
+       cleanupUnloadedListeners();
+       cleanupDisplayList();
        GC::get().collect();
-#endif
 }
 
 /* private */
@@ -420,6 +421,8 @@
        // remove all intervals
        clearIntervalTimers();
 
+       // TODO: remove key/mouse listeners
+
 #ifdef GNASH_USE_GC
        // Run the garbage collector again
        GC::get().collect();
@@ -1042,17 +1045,7 @@
                clearActionQueue();
        }
 
-       // Delete characters removed from the stage
-       // from the display lists
-       cleanupDisplayList();
-
-       // Delete unloaded characters from the listeners set
-       cleanupUnloadedListeners();
-
-#ifdef GNASH_USE_GC
-       // Run the garbage collector (step back !!)
-       GC::get().collect();
-#endif
+       cleanupAndCollect();
 
        assert(testInvariant());
 }

Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -b -r1.121 -r1.122
--- server/movie_root.h 23 Apr 2008 10:37:55 -0000      1.121
+++ server/movie_root.h 23 Apr 2008 13:29:54 -0000      1.122
@@ -777,6 +777,9 @@
     /// Erase unloaded characters from the given listeners list
     static void cleanupUnloadedListeners(CharacterList& ll);
 
+    /// Cleanup references to unloaded characters and run the garbage 
collector.
+    void cleanupAndCollect();
+
     /// Push a character listener to the front of given container, if not 
already present
     static void add_listener(CharacterList& ll, character* elem);
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]