alef 0.23.41

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
    @Override
    @SuppressWarnings("PMD.AvoidCatchingGenericException")
    public void close() {
        if (handle != null && !handle.equals(MemorySegment.NULL)) {
            try {
                NativeLib.{{ free_handle }}.invoke(handle);
            } catch (Throwable e) {
                throw new RuntimeException("Failed to free {{ class_name }}: " + e.getMessage(), e);
            }
        }
    }