Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix memory leak when init_asio produces an error (develop branch) #454

Merged
merged 1 commit into from
Jul 29, 2015

Conversation

mark-grimes
Copy link
Contributor

Version of #453 on the develop branch. Description copied from there:

Currently the init_asio functions that don't use an external io_service will leak the memory if an error is generated. This uses a smart pointer to temporarily hold the new io_service until it is confirmed the function has completed successfully and ownership taken.

Couldn't use a unique_ptr because this wouldn't work with non-C++11 systems. Couldn't use shared_ptr because it has no release() method.

@zaphoyd zaphoyd merged commit 1f50400 into zaphoyd:develop Jul 29, 2015
@mark-grimes mark-grimes deleted the addOriginalAsioError_develop branch July 29, 2015 16:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants