Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a common class Wrapper and IterWrapper to wrap native resource. #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Mar 1, 2023

  1. Use a common class Wrapper and IterWrapper to wrapp native resource.

    Native resource (pointer to shared_ptr) is stored as a long in the
    `Wrapper.Resource` class.
    
    As Wrapper implements AutoCloseable and we register the (java) resource
    to be cleaned at object destruction, we now properly delete the native
    resource.
    
    
    This also adding new macro to avoid writting the class name and so
    reduce potential typos.
    
    # Conflicts:
    #	lib/build.gradle
    #	lib/src/main/java/org/kiwix/libkiwix/Library.java
    mgautierfr committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    f4b5d7a View commit details
    Browse the repository at this point in the history