diff --git a/monero_libwallet2_api_c/monero_libwallet2_api_c.exp b/monero_libwallet2_api_c/monero_libwallet2_api_c.exp index 4cc3efe..232354c 100644 --- a/monero_libwallet2_api_c/monero_libwallet2_api_c.exp +++ b/monero_libwallet2_api_c/monero_libwallet2_api_c.exp @@ -275,4 +275,5 @@ _MONERO_cw_WalletListener_resetIsNewTransactionExist _MONERO_cw_WalletListener_height _MONERO_WalletManager_createDeterministicWalletFromSpendKey _MONERO_PendingTransaction_txKey -_MONERO_PendingTransaction_hex \ No newline at end of file +_MONERO_PendingTransaction_hex +_MONERO_free \ No newline at end of file diff --git a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp index 8e12a25..1445c0c 100644 --- a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp +++ b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp @@ -1911,6 +1911,12 @@ uint64_t MONERO_cw_WalletListener_height(void* cw_walletListener_ptr) { return listener->cw_isNeedToRefresh(); }; +// i hate windows + +void MONERO_free(void* ptr) { + free(ptr); +} + #ifdef __cplusplus } #endif diff --git a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h index 0bc5003..e768764 100644 --- a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h +++ b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h @@ -1011,6 +1011,8 @@ extern ADDAPI bool MONERO_cw_WalletListener_isNewTransactionExist(void* cw_walle extern ADDAPI void MONERO_cw_WalletListener_resetIsNewTransactionExist(void* cw_walletListener_ptr); extern ADDAPI uint64_t MONERO_cw_WalletListener_height(void* cw_walletListener_ptr); +extern ADDAPI void MONERO_free(void* ptr); + #ifdef __cplusplus } #endif \ No newline at end of file diff --git a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp index e5035ef..12117e2 100644 --- a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp +++ b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp @@ -1932,6 +1932,12 @@ void* WOWNERO_deprecated_create14WordSeed(char *path, char *password, char *lang return reinterpret_cast(wallet); } +// i hate windows + +void WOWNERO_free(void* ptr) { + free(ptr); +} + #ifdef __cplusplus } #endif diff --git a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h index 48b4a02..4321f16 100644 --- a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h +++ b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h @@ -1009,6 +1009,9 @@ extern ADDAPI uint64_t WOWNERO_cw_WalletListener_height(void* cw_walletListener_ extern ADDAPI void* WOWNERO_deprecated_restore14WordSeed(char *path, char *password, char *seed, int32_t networkType); extern ADDAPI void* WOWNERO_deprecated_create14WordSeed(char *path, char *password, char *language, int32_t networkType); extern ADDAPI uint64_t WOWNERO_deprecated_14WordSeedHeight(char *seed); + +extern ADDAPI void WOWNERO_free(void* ptr); + #ifdef __cplusplus } #endif \ No newline at end of file diff --git a/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp b/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp index ea84af5..6a3ad99 100644 --- a/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp +++ b/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp @@ -272,4 +272,5 @@ _WOWNERO_PendingTransaction_txKey _WOWNERO_PendingTransaction_hex _WOWNERO_deprecated_restore14WordSeed _WOWNERO_deprecated_create14WordSeed -_WOWNERO_deprecated_14WordSeedHeight \ No newline at end of file +_WOWNERO_deprecated_14WordSeedHeight +_WOWNERO_free \ No newline at end of file