H
hufaunder
I have a WPF application that spins off a thread. That thread needs to
show a dialog (InputDlg) to get some user input. The From my thread I
am displaying the dialog as shown bellow. The problem is that each
time I display the dialog (when I call Invoke) some memory is
allocated but it is never being freed even when the thread terminates.
How can I get this memory to be freed?
Thanks
delegate Boolean DelegateUserInputWindow();
void MyThread()
{
if((Boolean)this.Dispatcher.Invoke(DispatcherPriority.Normal,
new DelegateUserInputWindow(GetUserInput))
{...}
}
Boolean GetUserInput()
{
InputDlg inputDlg = new InputDlg();
Boolean returnValue;
inputDlg.Owner = App.Current.MainWindow;
returnValue = (Boolean)inputDlg.ShowDialogWin();
inputDlg.Close();
return returnValue;
}
show a dialog (InputDlg) to get some user input. The From my thread I
am displaying the dialog as shown bellow. The problem is that each
time I display the dialog (when I call Invoke) some memory is
allocated but it is never being freed even when the thread terminates.
How can I get this memory to be freed?
Thanks
delegate Boolean DelegateUserInputWindow();
void MyThread()
{
if((Boolean)this.Dispatcher.Invoke(DispatcherPriority.Normal,
new DelegateUserInputWindow(GetUserInput))
{...}
}
Boolean GetUserInput()
{
InputDlg inputDlg = new InputDlg();
Boolean returnValue;
inputDlg.Owner = App.Current.MainWindow;
returnValue = (Boolean)inputDlg.ShowDialogWin();
inputDlg.Close();
return returnValue;
}