Error when closing a dialog

Topics: Actions & Coroutines, Bootstrappers & IoC
Mar 7, 2014 at 8:01 AM
I have this function inside my mainview model, and want to fire up a login dialog.
The dialog commes up but when i close the dialog again from cancel or ok modal result i got a leak error.
Any sugestions
procedure TMyMainViewModel.ShowLoginDialog;
begin
WinMan := IoC.Get<IWindowManager>();
if WinMan.ShowDialog(Ioc.Get<ILoginViewModel>()) = mrCancel then
begin

end;
end;