From: Olivier S. <ob...@us...> - 2005-08-01 15:15:55
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32323/dev/JVCL3/run Modified Files: JvTFDays.pas Log Message: FCols is now freed AFTER the call to inherited to avoid accesses to it from within RelSchedNotification due to setting Manager to nil in the inherited destroyer. Index: JvTFDays.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvTFDays.pas,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** JvTFDays.pas 22 Jul 2005 13:18:01 -0000 1.53 --- JvTFDays.pas 1 Aug 2005 15:15:40 -0000 1.54 *************** *** 4300,4304 **** {$ENDIF Jv_TIMEBLOCKS} - FCols.Free; FEditor.Free; FThresholds.Free; --- 4300,4303 ---- *************** *** 4311,4314 **** --- 4310,4320 ---- PaintBuffer.Free; inherited Destroy; + + // This MUST be done after the inherited Destroy as it will set the Manager + // property to nil, thus triggering RelSchedNotification if ScheduleCount + // is still not 0. And in that very method, there is a test on Cols.Count. + // Hence, if FCols was to be freed before inherited, RelSchedNotification + // would try to access a freed object, leading to potential AVs. + FCols.Free; end; |