|
From: <cro...@li...> - 2005-06-07 19:17:25
|
Module Name: CFJavaEditor
Committed By: tchize
Date: Tue Jun 7 19:17:19 UTC 2005
Modified Files:
CFJavaEditor/src/cfeditor: CUndoStack.java
Log Message:
FIX: memory leaks from map views
mapviews are handling a backbuffer, mapcontrol has a handle to mapview, mapcontrol were not released because indireclty used as key to undostack instances.
SOLUCE: replaced the hastable used by undo stack with a WeakHashMap
PROBLEM: solve with 1.5 jvm but with is still not freed with 1.4 (jvm bug with internal frames maybe?)
PLANNED SOLUCE: have internalframe only keep weak refs to its parents.
Start of context diffs
Index: CFJavaEditor/src/cfeditor/CUndoStack.java
diff -c CFJavaEditor/src/cfeditor/CUndoStack.java:1.3 CFJavaEditor/src/cfeditor/CUndoStack.java:1.4
*** CFJavaEditor/src/cfeditor/CUndoStack.java:1.3 Sat May 3 11:23:07 2003
--- CFJavaEditor/src/cfeditor/CUndoStack.java Tue Jun 7 12:17:18 2005
***************
*** 36,42 ****
/** The controller of the undo stack model. */
private static CMainControl mStatic_control;
/** The shared hashtable that maps levels to undo stacks. */
! private static Hashtable m_hashFromLevelToStack = new Hashtable();
/** The undo stack. Contains all undoable operations. */
private Vector m_undoStack = new Vector(10, 10);
--- 36,42 ----
/** The controller of the undo stack model. */
private static CMainControl mStatic_control;
/** The shared hashtable that maps levels to undo stacks. */
! private static WeakHashMap m_hashFromLevelToStack = new WeakHashMap();
/** The undo stack. Contains all undoable operations. */
private Vector m_undoStack = new Vector(10, 10);
|