X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=examples%2Ftest.ml;h=05d60423d9594e0df413a4e39d622a3c2c64f70d;hb=efab5abed48d08e735c652c8454d14393c006c0e;hp=f06fe5bca5164f31bc05c42c2386ee432e5251ab;hpb=721a6cf6a40bbb25c7f878e89d18a6c0cfdd9109;p=perl4caml.git diff --git a/examples/test.ml b/examples/test.ml index f06fe5b..05d6042 100644 --- a/examples/test.ml +++ b/examples/test.ml @@ -1,11 +1,14 @@ (* Simple test of the API. * Copyright (C) 2003 Merjis Ltd. - * $Id: test.ml,v 1.4 2003-10-16 08:54:56 rich Exp $ + * $Id: test.ml,v 1.6 2003-12-11 17:41:52 rich Exp $ *) open Printf let () = + (* Perform a full collection - good way to find bugs in initialization code*) + Gc.full_major (); + (* Load "test.pl". *) Perl.eval "require 'examples/test.pl'"; @@ -45,5 +48,5 @@ let () = let sv = Perl.call_method obj "get_foo" [] in printf "TestClass.foo is %d\n" (Perl.int_of_sv sv); flush stdout; - (* Destroy the interpreter. *) - Perl.destroy (Perl.current_interpreter ()) + (* Perform a full collection - good way to find GC/allocation bugs. *) + Gc.full_major ()