musikr: implement raii jni classes
This should hopefully mitigate the memory leak problems unless I forget to transfer over ref ownership to the corresponding class. Analyzed memory use on load and it looks like the JVM is able to reclaim everything extracted by the native code, so I should hopefully be fine.
This commit is contained in:
@@ -45,9 +45,13 @@ set_target_properties(
|
||||
add_library(${CMAKE_PROJECT_NAME} SHARED
|
||||
# List C/C++ source files with relative paths to this CMakeLists.txt.
|
||||
taglib_jni.cpp
|
||||
JVMInputStream.cpp
|
||||
JVMTagMap.cpp
|
||||
JVMMetadataBuilder.cpp
|
||||
JInputStream.cpp
|
||||
JTagMap.cpp
|
||||
JMetadataBuilder.cpp
|
||||
JClassRef.cpp
|
||||
JObjectRef.cpp
|
||||
JStringRef.cpp
|
||||
JByteArrayRef.cpp
|
||||
)
|
||||
target_link_options(${CMAKE_PROJECT_NAME}
|
||||
# @Tolriq found that these flags can reduce the size of the linked
|
||||
|
||||
Reference in New Issue
Block a user