8000 Fix the memory leak caused by not releasing the memory of the PRNG at the end of the thread by whuaegeanse · Pull Request #1170 · colmap/colmap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix the memory leak caused by not releasing the memory of the PRNG at the end of the thread #1170

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

Merged
merged 18 commits into from
Mar 12, 2021

Conversation

whuaegeanse
Copy link
Contributor

Fix the memory leak caused by not releasing the memory of the PRNG at the end of the thread as mentioned by #1161.

@ahojnnes
Copy link
Contributor

Thank you for this fix. I think there is a way to avoid the compiler errors. Please have a look at: whuaegeanse#1. Let's see what the CI build does but we can safely drop support for older versions of GCC and other compilers at this point. Several years have passed since I originally wrote this code.

@whuaegeanse
Copy link
Contributor Author

@ahojnnes There seems to be no problem. But I have another question, does the extern variable PRNG need to be initialized to nullptr? There seems to be an implicit conversion and copy construction. Is there a certain overhead?

@ahojnnes
Copy link
Contributor

No, indeed, there is no need to initialize to the nullptr. We can drop it. Thanks.

@ahojnnes ahojnnes enabled auto-merge (squash) March 12, 2021 09:23
@ahojnnes ahojnnes merged commit 5cba5d1 into colmap:dev Mar 12, 2021
lucasthahn pushed a commit to tne-ai/colmap that referenced this pull request Aug 17, 2022
… the end of the thread (colmap#1170)

* Fix bugs of sift features matching.

* Remove the return value.

* Change names of function. And combine test function ExiststDescriptors with test function ExistsKeypoints.

* Enhance the feature of testing keypoints and descriptors by using LRUCache.

* Fix memory leak of PRNG

* Add missing include file

* Fix the problem of gcc compilation error

* Try to fix the problem of gcc compilation error

* Add missing operator *

* Fix memory leak in thread local PRNG

* Remove the meaningless copy construction code for PRNG

Co-authored-by: Johannes Schönberger <joschonb@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0