See extended description

1. gc() parameterized
2. If array size object is allocated via object_alloc(), it gets
deallocated independently of the parent array object. This screws up
deallocation statistics. Fixed this by allocating it directly using
posix_memalign()
3. cleanup() was not being called when application was exited in GUI
mode