hi:
    I have write some experimental code 

   #include <string.h>
   #include <vector>
   #include <cstdio>
   using namespace std;


    int main(int argc,char* argv[]) {


        
        MonoDomain *domain;
        
        
        domain = mono_jit_init_version("Unity Root Domain", "v4.0.30319");
        


        auto assembly = mono_domain_assembly_open(domain, 
"C:\\Users\\Administrator\\source\\repos\\AssemblyForDemo\\MainEntry\\bin\\Debug\\MainEntry.exe");
        
        int retval = mono_jit_exec(domain, assembly, argc - 1, argv + 1);
        
        
        mono_gc_collect(0);
        return 0;
  }



   The MainEntry.exe will generate two garbage objects, the garbage object will 
print some message when garbaged.
   But the result sometimes is remove nothing , sometimes remove two and 
sometimes remove one


   If I run the MainEntry.exe using the mono.exe, all the garbage object will 
be recycled.


                                                                                
               Thank You
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.dot.net
http://lists.dot.net/mailman/listinfo/mono-devel-list

Reply via email to