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.
This commit is contained in:
+6
-1
@@ -99,6 +99,11 @@ namespace OpenHardwareMonitor.GUI {
|
||||
|
||||
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 @@ namespace OpenHardwareMonitor.GUI {
|
||||
// Make sure the settings are saved when the user logs off
|
||||
Microsoft.Win32.SystemEvents.SessionEnded += delegate {
|
||||
SaveConfiguration();
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
private void InitializePlotForm() {
|
||||
|
||||
Reference in New Issue
Block a user