-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
ThreadIdToThreadLocals
objects leaked.
#624
Comments
UPD: Hre is detailed leaks report.
|
When you have some idea what 'new' expression is being leaked, please What memory leak detection are you using? I just can't tell what this complaint is about. On Sun, Dec 13, 2015 at 4:34 AM, Franken notifications@github.com wrote:
|
My main development flows using MS Visual Studio. My environment configured to use any of CRT leaks detection or VLD (Visual Leak Detector) tools. Both of them nagging me every time on same lines in code. Seems i use old code. I had pulled it at september. First leak at: Second leak at: |
On Mon, Dec 14, 2015 at 3:35 AM, Franken notifications@github.com wrote:
Static. Not a leak. Second leak at:
This is a new CriticalSection inside a Mutex that owns it.
|
Sounds like as airplane constructors tell us that their major issues are only safe liftoff and flight, but safe landing is major issue of airport and passengers. Take a look on some system with shared interprocess memory. All applications share same memory space and each of them must free all allocated memory. Or in other case memory will be lost until all system rebooted. A lot of embedded devices work with such systems. Also look at iPhone 3g and early Ios versions. I had updated my local repo and got fresh report from VLD.
|
On Mon, Dec 14, 2015 at 3:05 PM, Franken notifications@github.com wrote:
This is process-local memory is allocated from the free store with new.
What would a "self-testing subsystem" using dynamic loading of googletest
|
I just try point your attention that plane must lands safely too. And this is not a problem of OS or gtest users.
It may be a .dll file with gtest + all tests inside, which may be loaded by main application as plugin, executed for tests (via interface function) and unloaded after tests passed. Dynamic libraries work in shared with main application memory. |
Should be addressed by #1142 |
Hi there.
https://github.com/google/googletest/blob/master/googletest/src/gtest-port.cc#L516
Here some object is created. But it's never deleted. Memory leaks detection pointing me on this allocation and on
void Mutex::ThreadSafeLazyInit()
as well.Can you fix this leaks so leaks detection tool will stop pointing me on it?
Leaks of
ThreadIdToThreadLocals
can be fixed here:https://github.com/google/googletest/blob/master/googletest/src/gtest-port.cc#L408
Currently i fix it via counting of total elements that remains inside of
thread_local_values
and deleting it whenthread_local_values
becomes empty. But i don't satisfied with this fix as it maybe break some feature and i actually don't clearly understand this code.The text was updated successfully, but these errors were encountered: