Hi,
Appdomain unloading does not work under mono at the moment. I
think it would be best to make Unload () throw a
NotImplementedException, because otherwise people think that
this method works, when it isn't.
Zoltan
Piyush Garyali <[EMAIL PROTECTED]> írta:
> Hello,
>
> I was trying the following C# snippet and it works fine on
> Windows-MSCLR but throws an exception on Windows-Cygwin-mono.
>
> using System;
> using System.Runtime.Remoting
>
> [Serializable]
> class test
> {
> public int xxx = 10;
> static void Main()
> {
> AppDomain domain = AppDomain.CreateDomain("domain1");
> ObjectHandle oh =
> domain.CreateInstance(typeof(test).Assembly.FullName,
> typeof(test).FullName );
>
> test myObj = (test)oh.Unwrap();
>
> AppDomain.Unload(domain);
>
> myObj.Print();
> int a = myObj.xxx;
>
> Console.WriteLine(" Value : {0}", a);
> Console.WriteLine(" Value : {0}", myObj.xxx);
> Console.ReadLine();
> }
> void print()
> {
> Console.WriteLine(" AAA ");
> }
> }
>
> Am I doing something wrong here, for if this code works on
MSCLR,
> why does it throw an exception with mono? Does it mean
that the
> MS-CLR takes care of the refernces even after the
AppDomain is
> Unloaded and mono can't ?
>
> Thanks in advance,
>
> Regards,
> -pG-
> ___________________________________________________
> Medicine meets Marketing; Dr. Swati Weds Jayaram.
> Rediff Matchmaker strikes another interesting match !!
> Visit http://rediff.com/matchmaker?2
>
> _______________________________________________
> Mono-list maillist - [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
_______________________________________________
Mono-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list