Quantcast
Channel: Visual Studio フィードバック フォーラム
Viewing all articles
Browse latest Browse all 80

VS2010 + InterNational Feature Pack 2.0 YomiganaWPFTextBoxコントロールを使用したときのメモリ開放について

$
0
0

上記組合せでWindowクラスを作成し、ポップアップ表示させた後でクローズするとWindowクラスが使用していたメモリが開放されない現象で困っています。
Close後にGCの実行をしても開放されません。
回避策等ご存知の方いらっしゃいましたらお願いします。

XAML

<Window x:Class="Try.SimpleKana.SimpleWindow"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:i="clr-namespace:Microsoft.International.Windows.Controls;assembly=YomiganaWPFTextBox"
         xmlns:me="clr-namespace:Try.SimpleKana"
         Closed="Window_Closed"
         Title="SimpleWindow" SizeToContent="WidthAndHeight"><StackPanel><GroupBox Header=""><StackPanel><StackPanel  Orientation="Horizontal"><Label Content="漢字" Width="100"/><i:YomiganaWPFTextBox Name="C_Kanji"
                                           BindingControl="C_Yomi"
                                           AcceptsReturn="False"
                                           InputMethod.PreferredImeState="On"
                                           Width="200"/></StackPanel><StackPanel  Orientation="Horizontal"><Label Content="読み" Width="100"/><TextBox Name="C_Yomi" Width="200" /></StackPanel><Button Content="表示" Width="100" Click="GoClick"/></StackPanel></GroupBox></StackPanel></Window>

XAML.cs

    public partial class SimpleWindow : Window {
         private byte[] bytes;
         public SimpleWindow() {
             InitializeComponent();
             bytes = new byte[1024 * 1024 * 10]; //10MBほど確保してみる
         }
         ~SimpleWindow() {
             Debug.WriteLine("@@@ Finalized", this.GetType().Name);
         }
         private void Window_Closed(object sender, EventArgs e) {
             Debug.WriteLine("@ Closed()", this.GetType().Name);
             C_Kanji.Dispose();
         }
         //入力値を表示
         private void GoClick(object sender, RoutedEventArgs e) {
             MessageBox.Show(string.Format("Kanji = [{0}] Yomi =
[{1}]",C_Kanji.Text,C_Yomi.Text));
         }
     }


Viewing all articles
Browse latest Browse all 80

Latest Images

Trending Articles

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>