Skip to content

free memory allocated by Golang using C.CString() #390

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions android/src/main/jniLibs/arm64-v8a/libpolygonid.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ extern GoUint8 PLGNAtomicQueryV3Inputs(char** jsonResponse, char* in, char* cfg,
//
extern GoUint8 PLGNAtomicQueryV3OnChainInputs(char** jsonResponse, char* in, char* cfg, PLGNStatus** status);
extern void PLGNFreeStatus(PLGNStatus* status);

//PLGNFreeCString frees the memory allocated by Golang(using C.CString() ) for the given C string.
//It ensures a consistent and controlled memory management within Go code.
extern void PLGNFreeCString(char* str);
extern GoUint8 PLGNCleanCache(PLGNStatus** status);
extern GoUint8 PLGNCacheCredentials(char* in, char* cfg, PLGNStatus** status);

Expand Down
Binary file modified android/src/main/jniLibs/arm64-v8a/libpolygonid.so
Binary file not shown.
4 changes: 4 additions & 0 deletions android/src/main/jniLibs/armeabi-v7a/libpolygonid.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ extern GoUint8 PLGNAtomicQueryV3Inputs(char** jsonResponse, char* in, char* cfg,
//
extern GoUint8 PLGNAtomicQueryV3OnChainInputs(char** jsonResponse, char* in, char* cfg, PLGNStatus** status);
extern void PLGNFreeStatus(PLGNStatus* status);

//PLGNFreeCString frees the memory allocated by Golang(using C.CString() ) for the given C string.
//It ensures a consistent and controlled memory management within Go code.
extern void PLGNFreeCString(char* str);
extern GoUint8 PLGNCleanCache(PLGNStatus** status);
extern GoUint8 PLGNCacheCredentials(char* in, char* cfg, PLGNStatus** status);

Expand Down
Binary file modified android/src/main/jniLibs/armeabi-v7a/libpolygonid.so
Binary file not shown.
4 changes: 4 additions & 0 deletions android/src/main/jniLibs/x86/libpolygonid.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ extern GoUint8 PLGNAtomicQueryV3Inputs(char** jsonResponse, char* in, char* cfg,
//
extern GoUint8 PLGNAtomicQueryV3OnChainInputs(char** jsonResponse, char* in, char* cfg, PLGNStatus** status);
extern void PLGNFreeStatus(PLGNStatus* status);

//PLGNFreeCString frees the memory allocated by Golang(using C.CString() ) for the given C string.
//It ensures a consistent and controlled memory management within Go code.
extern void PLGNFreeCString(char* str);
extern GoUint8 PLGNCleanCache(PLGNStatus** status);
extern GoUint8 PLGNCacheCredentials(char* in, char* cfg, PLGNStatus** status);

Expand Down
Loading