作成日: 2020/11/06 最終更新日: 2021/07/28
文書種別
不具合
状況
修正済み
詳細
ドロップダウンカレンダー(GcDropDownCalendar)コントロール、または日付(GcDateTime)コントロールのドロップダウンカレンダーのHolidaySettingプロパティを設定した場合、コントロールを使用しているウィンドウの開閉を繰り返すとメモリリークが発生します。
回避方法
Service Pack 5より前のバージョンでは次の方法で回避可能です。
コントロールを使用している画面を閉じるときに、Closedイベントで下記のコードによりHolidaySettingプロパティの設定をクリアすると回避できます。
◎サンプルコード(C#)
◎サンプルコード(C#)
using GrapeCity.Windows.InputMan;
private void Window_Closed(object sender, EventArgs e)
{
Style calendarStyle = new Style(typeof(GcDropDownCalendar));
calendarStyle.Setters.Add(new Setter(GcDropDownCalendar.HolidaySettingProperty, null));
GcDateTime1.DropDownCalendarStyle = calendarStyle;
// GC.Collect();
// GC.WaitForPendingFinalizers();
// GC.Collect();
}
旧文書番号
86171