git.annexia.org
/
perl4caml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 0.3.14 for release.
[perl4caml.git]
/
examples
/
test.ml
diff --git
a/examples/test.ml
b/examples/test.ml
index
8ec8c74
..
05d6042
100644
(file)
--- a/
examples/test.ml
+++ b/
examples/test.ml
@@
-1,11
+1,14
@@
(* Simple test of the API.
* Copyright (C) 2003 Merjis Ltd.
(* Simple test of the API.
* Copyright (C) 2003 Merjis Ltd.
- * $Id: test.ml,v 1.
2 2003-10-12 17:33:14
rich Exp $
+ * $Id: test.ml,v 1.
6 2003-12-11 17:41:52
rich Exp $
*)
open Printf
let () =
*)
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'";
(* 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;
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
()
+ (*
Perform a full collection - good way to find GC/allocation bugs
. *)
+
Gc.full_major
()