;; destroy system
(bind-func psystem_destroy
(lambda (psys:psystem*)
(free (tref psys 1))
(free (tref psys 2))
(free (tref psys 3))
(free (tref psys 4))
(free (tref psys 5))
(free (tref psys 6))
(free (tref psys 7))
(free (tref psys 8))
(free (tref psys 9))
(free (tref psys 10))
(free psys)
void))