There were some issues in your code.
- Because alloc methods return with strong ownership, bindings must be marked with @Owned annotations.
- System.gc() in itself is too lazy, use Runtime.getRuntime().gc() instead.
I have created a pull request containing these modifications.
Hope this helps.