Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
ahojnnes merged 18 commits into
colmap:devcolmap/colmap:devfrom
whuaegeanse:devwhuaegeanse/colmap:devCopy head branch name to clipboard
Mar 12, 2021
Merged

Fix the memory leak caused by not releasing the memory of the PRNG at the end of the thread#1170
ahojnnes merged 18 commits into
colmap:devcolmap/colmap:devfrom
whuaegeanse:devwhuaegeanse/colmap:devCopy head branch name to clipboard

Conversation

@whuaegeanse

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.