移除_infoImage的清理代码,确认_infoImage作为全局变量由控件Dispose时统一释放
This commit is contained in:
@@ -95,13 +95,7 @@ namespace JoyD.Windows.CS.Toprie
|
||||
try
|
||||
{
|
||||
lock (_infoImageLock)
|
||||
{
|
||||
// 清理InfoImage
|
||||
if (_infoImage != null)
|
||||
{
|
||||
_infoImage = null;
|
||||
}
|
||||
|
||||
{
|
||||
// 检查连接状态
|
||||
bool isDisconnected = _deviceManager != null && _deviceManager.ConnectionStatus == ConnectionStatus.Disconnected;
|
||||
bool isReconnecting = _deviceManager != null && _deviceManager.ConnectionStatus == ConnectionStatus.Reconnecting;
|
||||
@@ -112,7 +106,6 @@ namespace JoyD.Windows.CS.Toprie
|
||||
if (isPaused)
|
||||
{
|
||||
// 暂停状态 - 最高优先级
|
||||
_infoImage = new Bitmap(BUFFER_WIDTH, BUFFER_HEIGHT);
|
||||
using (Graphics g = Graphics.FromImage(_infoImage))
|
||||
{
|
||||
// 设置半透明背景
|
||||
|
||||
Reference in New Issue
Block a user