summaryrefslogtreecommitdiffstats
path: root/virt-ctrl/virt_ctrl.ml
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2008-02-16 16:28:44 +0000
committerRichard W.M. Jones <rjones@redhat.com>2008-02-16 16:28:44 +0000
commit5881ddaa61385403718e1e5b415057a2d3ef4c45 (patch)
treecd40a40accabe8304df64d1216365f7f766082ba /virt-ctrl/virt_ctrl.ml
parent8a2211eb0976db33a6795ee9933bd7e7400c933c (diff)
downloadvirt-top-5881ddaa61385403718e1e5b415057a2d3ef4c45.tar.gz
virt-top-5881ddaa61385403718e1e5b415057a2d3ef4c45.tar.xz
virt-top-5881ddaa61385403718e1e5b415057a2d3ef4c45.zip
Clean up memory handling.
- Call Gc.compact during timeout handler and when program exits to check for memory errors. - Don't allow timeout exceptions to propagate - causes a segfault in lablgtk. - Tidy up the About dialog.
Diffstat (limited to 'virt-ctrl/virt_ctrl.ml')
-rw-r--r--virt-ctrl/virt_ctrl.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/virt-ctrl/virt_ctrl.ml b/virt-ctrl/virt_ctrl.ml
index 1de68f4..b4a3159 100644
--- a/virt-ctrl/virt_ctrl.ml
+++ b/virt-ctrl/virt_ctrl.ml
@@ -29,4 +29,7 @@ let () =
~shutdown_domain:Vc_domain_ops.shutdown_domain;
(* Enter the Gtk main loop. *)
- GMain.main ()
+ GMain.main ();
+
+ (* Useful to catch memory bugs in the ocaml libvirt bindings. *)
+ Gc.compact ()