Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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 <[email protected]>
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