Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

setNativeEnvironmentVariable() does not call (*env)->ReleaseStringUTFChars() #443

@alexcohn

Description

@alexcohn

Description
In setNativeEnvironmentVariable() native implementation, Strings are converted to C from Java, but not released

Expected behavior
Every call to GetStringUTFChars() must be finalized with a corresponding call to ReleaseStringUTFChars().

Current behavior
There seems to be no noticeable effect right now, but future hardening of the JVM or NDK may cause a problem here. Or, calling this method thousands and thousands of times could cause some visible memory leak.

Environment

  • Platform: Android
  • Architecture: any
  • Source branch: development, master, …

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfixed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions