Skip to content

Free URI with destruction of client to avoid mem leaks#161

Open
MartinNowack wants to merge 1 commit intojeroen:masterfrom
MartinNowack:fix_leak_uri
Open

Free URI with destruction of client to avoid mem leaks#161
MartinNowack wants to merge 1 commit intojeroen:masterfrom
MartinNowack:fix_leak_uri

Conversation

@MartinNowack
Copy link
Contributor

No description provided.

@jeroen
Copy link
Owner

jeroen commented Oct 23, 2018

This seems a bit overkill. Can't we just free the uri after creating the client? Or can we lookup the uri object in the finalizer for the client object?

@MartinNowack
Copy link
Contributor Author

@jeroen To be honest, I don't know. According to http://mongoc.org/libmongoc/current/tutorial.html, if it happens, it happens at the end. According to mongoc internals, it could be delated later.

Sure the lookup is possible, now it's just independent.

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