Closed
Description
I am locating a memory leak problem about Android NDK shared library. When I dlopen a shared library and dlclose it, there will be an 8 bytes memory leak. And when I dlopen and dlclose it again, there will be another 8 bytes memory leak.
And I find the leak is in the libc++.so, in locale.cpp file.
In locale.cpp:
locale_t __cloc() {
// In theory this could create a race condition. In practice
// the race condition is non-fatal since it will just create
// a little resource leak. Better approach would be appreciated.
static locale_t result = newlocale(LC_ALL_MASK, "C", 0);
return result;
}
And the os will malloc 8 bytes without free.
Is it a memory leak bug?
Metadata
Metadata
Assignees
Labels
No labels