# HG changeset patch # User moel.mich # Date 1309013188 0 # Node ID 16a86362c2cae6be6ff91988efdd9f5fbb7840ac # Parent f6db7258890e80d7dd70cd0cb6309dbaa6533694 Changed the maximum buffer size for double buffering of controls that isn't disposed after each draw call to the size of the screen. This should reduce the memory allocation and disposing on each sensor update. Also page faults are no longer increasing with this change. diff -r f6db7258890e -r 16a86362c2ca GUI/MainForm.cs --- a/GUI/MainForm.cs Sat Jun 25 11:06:54 2011 +0000 +++ b/GUI/MainForm.cs Sat Jun 25 14:46:28 2011 +0000 @@ -99,6 +99,11 @@ this.unitManager = new UnitManager(settings); + // make sure the buffers used for double buffering are not disposed + // after each draw call + BufferedGraphicsManager.Current.MaximumBuffer = + Screen.PrimaryScreen.Bounds.Size; + // set the DockStyle here, to avoid conflicts with the MainMenu this.splitContainer.Dock = DockStyle.Fill; @@ -258,7 +263,7 @@ // Make sure the settings are saved when the user logs off Microsoft.Win32.SystemEvents.SessionEnded += delegate { SaveConfiguration(); - }; + }; } private void InitializePlotForm() {